docshell/test/navigation/file_static_and_dynamic_1.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 <html>
michael@0 2 <head>
michael@0 3 <script>
michael@0 4 function test() {
michael@0 5 var ifr = document.createElement("iframe");
michael@0 6 ifr.src = "frame0.html";
michael@0 7 document.getElementById("dynamic").appendChild(ifr);
michael@0 8 var staticFrame = document.getElementById("staticframe");
michael@0 9 staticFrame.onload = window.location = "goback.html";
michael@0 10 staticFrame.contentWindow.location = "frame1.html";
michael@0 11 }
michael@0 12
michael@0 13 function start() {
michael@0 14 if (++opener.testCount == 1) {
michael@0 15 test();
michael@0 16 } else {
michael@0 17 var staticFrame = document.getElementById("staticframe");
michael@0 18 opener.ok(new String(staticFrame.contentWindow.location).indexOf(staticFrame.src) >= 0,
michael@0 19 "Wrong document loaded!");
michael@0 20 opener.nextTest();
michael@0 21 window.close();
michael@0 22 }
michael@0 23 }
michael@0 24 </script>
michael@0 25 </head>
michael@0 26 <body onload="setTimeout('start()', 0)">
michael@0 27 <h5>Dynamic</h5>
michael@0 28 <div id="dynamic"></div>
michael@0 29 <h5>Static</h5>
michael@0 30 <div id="static"><iframe id="staticframe" src="frame0.html"></iframe></div>
michael@0 31 </body>
michael@0 32 </html>

mercurial