Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 <html>
2 <head>
3 <script>
4 function dynFrameLoad() {
5 var ifrs = document.getElementsByTagName("iframe");
6 opener.ok(new String(ifrs[0].contentWindow.location).indexOf(ifrs[0].src) >= 0,
7 "Wrong document loaded (1)\n");
8 opener.ok(new String(ifrs[1].contentWindow.location).indexOf(ifrs[1].src) >= 0,
9 "Wrong document loaded (2)\n");
10 if (opener && ++opener.testCount == 1) {
11 window.location = "goback.html";
12 } else {
13 opener.nextTest();
14 window.close();
15 }
16 }
18 window.addEventListener("load",
19 function () {
20 var container = document.getElementById("t1");
21 container.addEventListener("load", dynFrameLoad, true);
22 container.appendChild(container.appendChild(document.getElementById("i1")));
23 }, false);
24 </script>
25 </head>
26 <body>
27 <h5>Container:</h5>
28 <div id="t1"></div>
29 <h5>Original frames:</h5>
30 <iframe id="i1" src="frame0.html"></iframe>
31 <iframe src="frame1.html"></iframe>
32 </body>
33 </html>