| var element = document.createElement("div"); |
| element.textContent = msg; |
| document.body.appendChild(element); |
| document.body.appendChild(document.createElement("br")); |
| function fastTimeoutHandler() { |
| function slowTimeoutHandler() { |
| // Note: the count threshold is tied somewhat to the |
| // maxTimerNestingLevel in DOMTimer.cpp. |
| log("FAIL -- timeout ran " + count + " times"); |
| if (!window.testRunner) { |
| log("This test requires the LayoutTestController"); |
| testRunner.waitUntilDone(); |
| // Make timers run no more often than twice a second. |
| internals.settings.setMinimumTimerInterval(0.5); |
| setInterval(slowTimeoutHandler, 1000); |
| setInterval(fastTimeoutHandler, 1); |
| <body onload="runTest()"> |