tor-browser

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

059.html (1110B)


      1 <!DOCTYPE html>
      2 <html><head>
      3        <title> scheduler: appending code to initially non-empty SCRIPT tag in DOM after removing its initial child </title>
      4        <script src="/resources/testharness.js"></script>
      5        <script src="/resources/testharnessreport.js"></script>
      6        <script src="testlib/testlib.js"></script>
      7        <script>/**/</script>
      8 </head>
      9 <body>
     10 
     11        <div id="log">FAILED (This TC requires JavaScript enabled)</div>
     12 
     13        <script>log('inline script #1');
     14                var script=document.getElementsByTagName('script')[3];
     15                script.removeChild(script.firstChild);
     16                script.appendChild( document.createTextNode('log("injected script code");') );
     17                log('end script #1');
     18        </script>
     19        <script type="text/javascript">
     20        log( 'inline script #2' );
     21        var t = async_test()
     22 
     23        function test() {
     24                assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'inline script #2']);
     25                t.done();
     26        }
     27        onload = t.step_func(test);
     28        </script>
     29 
     30 </body></html>