<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>
