1 <p>This test verifies that the load event fires after a document.close, even if the document contains no subresources. See
<a href=
"http://bugs.webkit.org/show_bug.cgi?id=13241">bug
13241</a>.
</p>
3 <pre id=
"console"></pre>
10 document
.getElementById("console").appendChild(document
.createTextNode(s
+ "\n"));
13 function afterOnload()
15 log("PASS: onload fired");
16 if (window
.testRunner
)
17 testRunner
.notifyDone();
22 if (window
.testRunner
) {
23 testRunner
.dumpAsText();
25 // Quirkily, the FrameLoadDelegate API considers our <iframe> fully loaded
26 // once it has loaded its initial empty document. So, if we want DumpRenderTree
27 // to wait for the load event caused by our document.close() before dumping,
28 // we need to tell it so explicitly.
29 testRunner
.waitUntilDone();
32 var doc
= frames
[0].document
;
34 doc
.write("<body onload=\"parent.afterOnload()\">");