Some perf tests time out when ran by run-perf-tests
[WebKit-https.git] / PerformanceTests / Bindings / event-target-wrapper.html
1 <!DOCTYPE html>
2 <body>
3 <pre id="log"></pre>
4 <script src="../Parser/resources/runner.js"></script>
5 <a href="#">Click here to start</a>
6 <script>
7 var link = document.getElementsByTagName('a')[0];
8 var evt = null;
9 var kIteratonsPerTest = 1000000;
10
11 link.addEventListener('click', function(event) {
12     link.textContent = '';
13     window.evt = event;
14     event.preventDefault();
15
16     start(20, function() {
17         var e = window.evt;
18         for (var x = 0; x < kIteratonsPerTest; x++) {
19             e.target;
20         }
21     }, 10);
22
23     return false;
24 }, false);
25
26 if (window.eventSender) {
27     eventSender.mouseMoveTo(link.offsetLeft + 5, link.offsetTop + 5);
28     eventSender.mouseDown();
29     eventSender.mouseUp();
30 }
31 </script>
32 </body>