blob: ebb7d5a51794b8bf4aa40c139549770f690ed005 [file] [log] [blame]
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
function f1()
{
document.getElementById('line1').appendChild(document.createTextNode('The function f1 was called, clearTimeout failed.'));
}
function f2()
{
document.getElementById('line2').appendChild(document.createTextNode('The function f2 was called.'));
if (window.layoutTestController)
layoutTestController.notifyDone();
}
var t1 = setTimeout('f1()', 0);
setTimeout('f2()', 20);
clearTimeout(t1);
</script>
<p>This test checks that clearTimeout works by setting up two timeouts and cancelling one.
If the test succeeds you should see only function f2 being called below.</p>
<div id="line1"></div>
<div id="line2"></div>