1<!DOCTYPE html> 2<body> 3<script src="../resources/runner.js"></script> 4<p><a href="#">Click here to start</a></p> 5<script> 6var link = document.getElementsByTagName('a')[0]; 7var evt = null; 8var kIteratonsPerTest = 100000; 9 10link.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 24if (window.eventSender) { 25 eventSender.mouseMoveTo(link.offsetLeft + 5, link.offsetTop + 5); 26 eventSender.mouseDown(); 27 eventSender.mouseUp(); 28} 29</script> 30</body> 31