Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Window / clear-timeout.html
blobb5bf1f1a61848a27c1b440d43b7367bfc0bb367f
1 <script>
3 if (window.testRunner) {
4 testRunner.dumpAsText();
5 testRunner.waitUntilDone();
8 function f1()
10 document.getElementById('line1').appendChild(document.createTextNode('The function f1 was called, clearTimeout failed.'));
13 function f2()
15 document.getElementById('line2').appendChild(document.createTextNode('The function f2 was called.'));
16 if (window.testRunner)
17 testRunner.notifyDone();
20 var t1 = setTimeout('f1()', 0);
21 setTimeout('f2()', 20);
22 clearTimeout(t1);
24 </script>
25 <p>This test checks that clearTimeout works by setting up two timeouts and cancelling one.
26 If the test succeeds you should see only function f2 being called below.</p>
27 <div id="line1"></div>
28 <div id="line2"></div>