summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/slow-click.html
blob: 46e20bf61291facbd3353c85006b6360fe4bd3ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

<body>
Test that click() on checkboxes is not slow.<br><input type=checkbox id=cb>
<script>
if (window.testRunner)
    testRunner.dumpAsText();
    
var starttime = new Date().getTime();
var cb = document.getElementById('cb');
for (n=0; n<100; n++) {
    cb.click();
}
var endtime = new Date().getTime() - starttime
document.write("<br>" + (endtime > 2000 ? "FAIL, took more than 2s to click() 100 times" : "PASS"));
</script>
</body>