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
michael@0 | 1 | <html> |
michael@0 | 2 | <head> |
michael@0 | 3 | <script> |
michael@0 | 4 | function dynFrameLoad() { |
michael@0 | 5 | var ifrs = document.getElementsByTagName("iframe"); |
michael@0 | 6 | opener.ok(new String(ifrs[0].contentWindow.location).indexOf(ifrs[0].src) >= 0, |
michael@0 | 7 | "Wrong document loaded (1)\n"); |
michael@0 | 8 | opener.ok(new String(ifrs[1].contentWindow.location).indexOf(ifrs[1].src) >= 0, |
michael@0 | 9 | "Wrong document loaded (2)\n"); |
michael@0 | 10 | if (opener && ++opener.testCount == 1) { |
michael@0 | 11 | window.location = "goback.html"; |
michael@0 | 12 | } else { |
michael@0 | 13 | opener.nextTest(); |
michael@0 | 14 | window.close(); |
michael@0 | 15 | } |
michael@0 | 16 | } |
michael@0 | 17 | |
michael@0 | 18 | window.addEventListener("load", |
michael@0 | 19 | function () { |
michael@0 | 20 | var container = document.getElementById("t1"); |
michael@0 | 21 | container.addEventListener("load", dynFrameLoad, true); |
michael@0 | 22 | container.appendChild(container.appendChild(document.getElementById("i1"))); |
michael@0 | 23 | }, false); |
michael@0 | 24 | </script> |
michael@0 | 25 | </head> |
michael@0 | 26 | <body> |
michael@0 | 27 | <h5>Container:</h5> |
michael@0 | 28 | <div id="t1"></div> |
michael@0 | 29 | <h5>Original frames:</h5> |
michael@0 | 30 | <iframe id="i1" src="frame0.html"></iframe> |
michael@0 | 31 | <iframe src="frame1.html"></iframe> |
michael@0 | 32 | </body> |
michael@0 | 33 | </html> |
michael@0 | 34 |