2 This test checks that onload events fire on iframe and object
3 elements when their contents finish loading, and that these are
4 separate event objects from those that fire on the body inside the
5 frame. If it passes, you will see
6 blocks below, each with a
6 three-line message that ends in false.
11 if (window
.testRunner
)
12 testRunner
.dumpAsText();
16 currentLogEntry
+= s
+ "<br>";
19 var innerEvent
= null;
21 var currentLogEntry
= '';
23 function logOuter(msg
, event
)
26 log('Outer event same as inner: ' + (innerEvent
== event
));
29 logArray
.push(currentLogEntry
);
32 if (logArray
.length
== 6) {
34 document
.getElementById("console").innerHTML
= logArray
.join('');
38 function logInner(tag
, event
)
40 parent
.log("Fired load event on body inside " + tag
);
41 parent
.innerEvent
= event
;
47 src=
"resources/iframe-object-onload-iframe-1.html"
48 onload=
"logOuter('Fired event on iframe', event)">
52 src=
"resources/iframe-object-onload-iframe-2.html"
53 onload=
"logOuter('Fired event on iframe even though default was prevented', event)">
57 src=
"resources/iframe-object-onload-iframe-3.html"
58 onload=
"logOuter('Fired event on object even though propagation was stopped', event)">
63 data=
"resources/iframe-object-onload-object-1.html"
64 onload=
"logOuter('Fired event on object', event)">
69 data=
"resources/iframe-object-onload-object-2.html"
70 onload=
"logOuter('Fired event on object even though default was prevented', event)">
75 data=
"resources/iframe-object-onload-object-3.html"
76 onload=
"logOuter('Fired event on object even though propagation was stopped', event)">