Regression(r236613): Parser/html-parser.html performance test is failing
[WebKit-https.git] / PerformanceTests / Bindings / event-target-wrapper.html
1 <!DOCTYPE html>
2 <body>
3 <script src="../resources/runner.js"></script>
4 <p><a href="#">Click here to start</a></p>
5 <script>
6 var link = document.getElementsByTagName('a')[0];
7 var evt = null;
8 var kIteratonsPerTest = 100000;
9
10 link.addEventListener('click', function(event) {
11     link.textContent = '';
12     window.evt = event;
13     event.preventDefault();
14
15     PerfTestRunner.measureRunsPerSecond({run: function () {
16         var e = window.evt;
17         for (var x = 0; x < kIteratonsPerTest; x++)
18             e.target;
19     }});
20
21     return false;
22 }, false);
23
24 if (window.eventSender) {
25     eventSender.mouseMoveTo(link.offsetLeft + 5, link.offsetTop + 5);
26     eventSender.mouseDown();
27     eventSender.mouseUp();
28 }
29 </script>
30 </body>