Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Window / setTimeout-no-arguments.html
blobd401834737fd3c4b30ad990e5ce28aa1aa5c5559
1 <html>
2 <script>
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);
11 else
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();
23 function runTest()
25 if (window.testRunner) {
26 testRunner.dumpAsText();
27 testRunner.waitUntilDone();
30 setTimeout(handleTimeout);
33 </script>
34 <body onload="runTest()">
35 <p id="description"></p>
36 <div id="console">
37 Result: <span class="fail">Test Failed.</span> Timeout was not called.
38 </div>
39 <script>
40 description(
41 'This tests that calling setTimeout without a delay will still work.<br/> rdar: problem/5480234 JS setTimeout function requires a second argument' +
42 '<br/><br/>'+
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.\"'
45 </script>
46 </body>
47 </html>