4 if (window
.testRunner
) {
5 testRunner
.dumpAsText();
6 testRunner
.waitUntilDone();
9 var s
= document
.createElement('script');
10 s
.setAttribute('onload', 'alert("Script onload handler called!"); if (window.testRunner) testRunner.notifyDone()');
12 s
.src
= "resources/script-element-gc.js";
14 document
.body
.appendChild(s
);
17 <body onload=
"runTest()">
18 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).
19 <p>SUCCESS! Didn't Crash!
</p>