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.

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

mercurial