docshell/test/navigation/file_static_and_dynamic_1.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

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 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