4 var isDocumentLoaded
= false;
5 var isFrameLoaded
= false;
7 function everythingLoaded()
9 var otherDocument
= document
.getElementById("frame").contentDocument
;
10 var imageURL
= document
.URL
.replace("image-load-cross-document.html", "resources/blue_rect.jpg");
11 otherDocument
.body
.innerHTML
= "<p id='container'><img src='" + imageURL
+ "'></p>";
12 var container
= otherDocument
.getElementById("container");
13 document
.adoptNode(container
);
14 document
.body
.appendChild(container
);
15 container
.innerHTML
= "";
17 document
.getElementById("result").innerHTML
= "PASS: Test complete and passed unless a subsequent test crashes.";
19 if (window
.testRunner
)
20 testRunner
.notifyDone();
23 function documentLoaded()
25 if (window
.testRunner
) {
26 testRunner
.dumpAsText();
27 testRunner
.waitUntilDone();
30 isDocumentLoaded
= true;
36 function frameLoaded()
46 <body onload=
"documentLoaded()">
47 <p>This tests the case where an image is loaded in one document and then moved to another before the load event fires.
</p>
48 <p id=
"result">TEST NOT COMPLETE YET
</p>
49 <iframe id=
"frame" src=
"resources/image-load-subframe.html" onload=
"frameLoaded()"></iframe>