3 <script src=
"../../media-resources/video-test.js"></script>
7 var url
= location
.href
;
8 var queryIndex
= url
.indexOf("?");
10 if (queryIndex
>= 0) {
11 loadCount
= parseInt(url
.substring(queryIndex
+ 1));
13 // Enforce an arbitrary reload limit that is high enough to trigger previosly observed crashes.
17 url
= url
.substring(0, queryIndex
);
20 return url
+ "?" + (loadCount
+ 1);
25 var url
= getNextURL();
26 if (url
.length
== 0) {
35 iframe
= document
.createElement("iframe");
36 iframe
.src
= "../../media-resources/resources/frame_size_change.webm";
37 document
.getElementById("store_div").appendChild(iframe
);
38 window
.setTimeout(moveIframeBodyIntoDocumentBody
, 20);
41 function moveIframeBodyIntoDocumentBody()
43 var iframeContentDocument
= iframe
.contentDocument
;
44 var iframeDocumentElement
= iframeContentDocument
.documentElement
;
46 iframeContentDocument
.onreadystatechange = function(e
)
48 // Attempts to move the document body back into the iframe document.
49 iframeContentDocument
.appendChild(iframeDocumentElement
);
52 // Moves the iframe body into the current document.
53 document
.body
.appendChild(iframeContentDocument
.firstChild
);
58 <body onload=
"start()">
59 <p>Tests that moving a
<video
> in and out of an iframe does not trigger a crash.
</p>
60 <div id=
"store_div"></div>