blob: 74d091fabab438bd055e6d9b4ac2c81a4ff91b73 [file] [log] [blame]
<html>
<head>
<script src="/js-test-resources/js-test-pre.js"></script>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function log(msg) {
document.getElementById("log").innerHTML += msg;
}
function test() {
var s = document.createElement("script");
s.src = "resources/delayed-log.php?delay=1&msg=PASS&done=1";
s.async = true;
document.body.appendChild(s);
// s should still execute.
document.body.removeChild(s);
setTimeout(gc, 1);
}
</script>
</head>
<body onload="test()">
<div>
<p>
Test that an asynchronous script tag is executed, even if it's removed from the
document before it was loaded.
</p>
<p>
This test passes if the word "PASS" is displayed below.
</p>
</div>
<div id="log"></div>
</body>
</html>