tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

file_static_and_dynamic_1.html (948B)


      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    }
     12 
     13    function start() {
     14      if (++opener.testCount == 1) {
     15        test();
     16      } else {
     17        var staticFrame = document.getElementById("staticframe");
     18        opener.ok(String(staticFrame.contentWindow.location).includes(staticFrame.src),
     19                  "Wrong document loaded!");
     20        opener.finishTest();
     21      }
     22    }
     23    </script>
     24  </head>
     25  <body onload="setTimeout('start()', 0)">
     26    <h5>Dynamic</h5>
     27    <div id="dynamic"></div>
     28    <h5>Static</h5>
     29    <div id="static"><iframe id="staticframe" src="frame0.html"></iframe></div>
     30  </body>
     31 </html>