blob: b3916772cd3919a3d068c238cbf093d70c7456f4 [file] [log] [blame]
<html>
<script>
function runTest() {
if (window.layoutTestController)
layoutTestController.dumpAsText();
var s = document.createElement('script');
s.setAttribute('onload', 'alert("Script onload handler called!")')
s.id = "theScript";
s.src = "resources/script-element-gc.js";
document.body.appendChild(s);
}
</script>
<body onload="runTest()">
This tests that removing the script element from the script loaded by the element itself, and then garbage collecting does not cause a crash when dispatching the onload element (because the script element was freed).
<p>SUCCESS! Didn't Crash!</p>
</body>
</html>