| function description(msg) |
| var span = document.createElement("span"); |
| span.innerHTML = '<p>' + msg + '</p>'; |
| var description = document.getElementById("description"); |
| if (description.firstChild) |
| description.replaceChild(span, description.firstChild); |
| description.appendChild(span); |
| document.getElementById("console").innerHTML = 'Result: <span class="pass">Timeout was successful</span><br>'; |
| if (window.layoutTestController) |
| layoutTestController.notifyDone(); |
| if (window.layoutTestController) { |
| layoutTestController.dumpAsText(); |
| layoutTestController.waitUntilDone(); |
| setTimeout(handleTimeout); |
| <body onload="runTest()"> |
| Result: <span class="fail">Test Failed.</span> Timeout was not called. |
| 'This tests that calling setTimeout without a delay will still work.<br/> rdar: problem/5480234 JS setTimeout function requires a second argument' + |
| '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.\"' |