blob: 3701046c98822345e64438c818928615fdab1775 [file] [log] [blame]
<!DOCTYPE html>
<body>
<script src="../resources/runner.js"></script>
<p><a href="#">Click here to start</a></p>
<script>
var link = document.getElementsByTagName('a')[0];
var evt = null;
var kIteratonsPerTest = 100000;
link.addEventListener('click', function(event) {
link.textContent = '';
window.evt = event;
event.preventDefault();
PerfTestRunner.measureRunsPerSecond({
description: "Measures performance of repeatedly accessing the event object within an event handler.",
run: function () {
var e = window.evt;
for (var x = 0; x < kIteratonsPerTest; x++)
e.target;
}});
return false;
}, false);
if (window.eventSender) {
eventSender.mouseMoveTo(link.offsetLeft + 5, link.offsetTop + 5);
eventSender.mouseDown();
eventSender.mouseUp();
}
</script>
</body>