blob: 25c7ea8aef7a92c551876bda3b10aa2558519e57 [file] [log] [blame]
<html>
<head>
<script>
function log(msg) {
var element = document.createElement("div");
element.textContent = msg;
document.body.appendChild(element);
document.body.appendChild(document.createElement("br"));
}
var count = 0;
function fastTimeoutHandler() {
++count;
}
function slowTimeoutHandler() {
// Note: the count threshold is tied somewhat to the
// maxTimerNestingLevel in DOMTimer.cpp.
if (count < 10)
log("PASS");
else
log("FAIL -- timeout ran " + count + " times");
testRunner.notifyDone();
}
function runTest() {
if (!window.testRunner) {
log("This test requires the LayoutTestController");
return;
}
testRunner.dumpAsText();
testRunner.waitUntilDone();
// Make timers run no more often than twice a second.
internals.settings.setMinimumTimerInterval(0.5);
setInterval(slowTimeoutHandler, 1000);
setInterval(fastTimeoutHandler, 1);
}
</script>
</head>
<body onload="runTest()">
</body>
</html>