1 <script src=
"/js-test-resources/js-test.js"></script>
4 if (window
.testRunner
) {
5 testRunner
.waitUntilDone();
6 testRunner
.dumpAsText();
10 // If the garbage collection causes the image load to stop and therefore causes the load event to fire on the main frame, we failed.
11 alert("FAIL: The load event fired");
13 if (window
.testRunner
)
14 testRunner
.notifyDone();
18 <body onload=
"loaded();">
20 This has an embed element representing an image. That embed element is wrapped in a div. It removes the div, forces garbage collection, and makes sure that the window load event does not fire. It also makes sure there is no crash.
<br>
22 <embed type=
"image/gif" src=
"resources/slowimage.php">
30 if (window
.testRunner
)
31 testRunner
.notifyDone();
36 setTimeout("finished();", 0);
39 function removeTheDiv() {
40 var element
= window
.document
.getElementById("thediv");
41 element
.parentNode
.removeChild(element
);
43 setTimeout("forceGC();", 0);
46 setTimeout("removeTheDiv();", 0);