| <script src="/js-test-resources/js-test-pre.js"></script> |
| testRunner.waitUntilDone(); |
| // If the garbage collection causes the image load to stop and therefore causes the load event to fire on the main frame, we failed. |
| alert("FAIL: The load event fired"); |
| <body onload="loaded();"> |
| This has an object element representing an image. That object 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> |
| <object type="image/gif" data="resources/slowimage.py"> |
| setTimeout("finished();", 0); |
| function removeTheDiv() { |
| var element = window.document.getElementById("thediv"); |
| element.parentNode.removeChild(element); |
| setTimeout("forceGC();", 0); |
| setTimeout("removeTheDiv();", 0); |