tor-browser

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

119.html (1112B)


      1 <!DOCTYPE html>
      2 <html><head>
      3    <title>scheduler: external defer script created with createContextualFragment</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"></div>
     10    <script>
     11        log('inline script #1');
     12        var t = async_test();
     13 
     14        t.step(function () {
     15            var range = document.createRange();
     16            var fragment = range.createContextualFragment("<script defer src='scripts/include-1.js?pipe=trickle(d1)'><\/script>");
     17            document.body.appendChild(fragment.firstChild);
     18        });
     19 
     20        addEventListener("DOMContentLoaded", t.step_func(function () {
     21            assert_array_equals(eventOrder, ['inline script #1', 'end inline script #1']);
     22        }));
     23 
     24        addEventListener("load", t.step_func_done(function () {
     25            assert_array_equals(eventOrder, ['inline script #1', 'end inline script #1', 'external script #1']);
     26        }));
     27 
     28        log('end inline script #1');
     29    </script>
     30 </body>
     31 </html>