| testRunner.waitUntilDone(); |
| document.getElementById("log").innerHTML += msg; |
| Test that a synchronous script tag is executed in the right order, even if it's |
| removed from the document before it was loaded. |
| This test passes if the number "4123" is displayed below. |
| // All these scripts should be executed after the next script tag. |
| var s1 = document.createElement("script"); |
| s1.src = "resources/delayed-log.py?delay=3&msg=1"; |
| document.body.appendChild(s1); |
| var s2 = document.createElement("script"); |
| s2.src = "resources/delayed-log.py?delay=2&msg=2"; |
| document.body.appendChild(s2); |
| var s3 = document.createElement("script"); |
| s3.src = "resources/delayed-log.py?delay=1&msg=3&done=1"; |
| document.body.appendChild(s3); |
| // s1 should still execute, and it should execute before s2 and s3. |
| document.body.removeChild(s1); |
| <script>log("4");</script> |