tor-browser

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

112.html (1051B)


      1 <!DOCTYPE html>
      2 <html><head>
      3        <title> scheduler: removing async attribute at runtime, script also has defer attribute</title>
      4        <meta name="timeout" content="long">
      5        <script src="/resources/testharness.js"></script>
      6        <script src="/resources/testharnessreport.js"></script>
      7        <script src="testlib/testlib.js"></script>
      8 </head>
      9 <body>
     10 
     11        <div id="test"></div>
     12        <div id="log">FAILED (This TC requires JavaScript enabled)</div>
     13 
     14        <script id="async-script" async defer src="scripts/include-1.js?pipe=trickle(d3)"></script>
     15 
     16        <script>
     17          var t = async_test();
     18          document.getElementById("async-script").removeAttribute("async");
     19 
     20          addEventListener("DOMContentLoaded", t.step_func(function () {
     21            assert_array_equals(eventOrder, []);
     22          }), false);
     23 
     24          addEventListener("load", t.step_func(function () {
     25            assert_array_equals(eventOrder, ["external script #1"]);
     26            t.done();
     27          }), false);
     28 
     29        </script>
     30 </body></html>