Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / timer-clear-interval-in-handler.html
blob6f4812c2f5b0aa40eb0cf1f0a7a3d8ad8609d704
1 <html>
2 <head>
3 <script>
4 function timeoutHandler() {
5 // Invoke it a few times so that we get the nesting
6 count++;
8 if (count > 10) {
9 clearInterval(intervalID);
11 if (window.testRunner)
12 testRunner.notifyDone();
16 var intervalID;
17 var count = 0;
19 function runTests() {
20 if (window.testRunner) {
21 testRunner.dumpAsText()
22 testRunner.waitUntilDone();
25 intervalID = setInterval(timeoutHandler, 1);
27 </script>
28 </head>
29 <body onload="runTests()">
30 This tests that removing an interval timer inside of its timeout handler does not cause a crash. Success, didn't crash!
31 </body>
32 </html>