tor-browser

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

109.html (921B)


      1 <!DOCTYPE html>
      2 <html><head>
      3  <title> scheduler: javascript URL in iframe, src set via DOM</title>
      4  <script src="/resources/testharness.js"></script>
      5  <script src="/resources/testharnessreport.js"></script>
      6  <script src="testlib/testlib.js"></script>
      7 </head>
      8 <body>
      9  <div id="log">Not tested</div>
     10  <script>
     11    var t = async_test();
     12 
     13    t.step(function() {
     14      var iframe_onload = false;
     15      log("inline script #1");
     16      var iframe = document.createElement("iframe");
     17      iframe.src = "javascript:void(top.log('JS URL'));";
     18      log("inline script #2");
     19      iframe.onload = function () { log("iframe onload") };
     20      document.body.appendChild(iframe);
     21      log("inline script #3");
     22    })
     23 
     24    onload = t.step_func(function() {
     25      assert_array_equals(eventOrder, ["inline script #1", "inline script #2", "inline script #3", "JS URL", "iframe onload"]);
     26      t.done();
     27    });
     28  </script>
     29 </body>