4 function description(msg
)
6 var span
= document
.createElement("span");
7 span
.innerHTML
= '<p>' + msg
+ '</p>';
8 var description
= document
.getElementById("description");
9 if (description
.firstChild
)
10 description
.replaceChild(span
, description
.firstChild
);
12 description
.appendChild(span
);
15 function handleTimeout()
17 document
.getElementById("console").innerHTML
= 'Result: <span class="pass">Timeout was successful</span><br>';
19 if (window
.testRunner
)
20 testRunner
.notifyDone();
25 if (window
.testRunner
) {
26 testRunner
.dumpAsText();
27 testRunner
.waitUntilDone();
30 setTimeout(handleTimeout
);
34 <body onload=
"runTest()">
35 <p id=
"description"></p>
37 Result:
<span class=
"fail">Test Failed.
</span> Timeout was not called.
41 'This tests that calling setTimeout without a delay will still work.<br/> rdar: problem/5480234 JS setTimeout function requires a second argument' +
43 'In the case of a successful test you will see the text \"<span class="pass">Timeout was successful</span>\" otherwise you will see \"<span class="fail">Test Failed.</span> Timeout was not called.\"'