tor-browser

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

057.html (890B)


      1 <!DOCTYPE html>
      2 <html><head>
      3  <title> scheduler: appending code to initially non-empty SCRIPT tag in DOM (whitespace only) </title>
      4  <script src="/resources/testharness.js"></script>
      5  <script src="/resources/testharnessreport.js"></script>
      6  <script src="testlib/testlib.js"></script>
      7  <script>
      8  </script>
      9 </head>
     10 <body>
     11 
     12  <div id="log">FAILED (This TC requires JavaScript enabled)</div>
     13 
     14  <script>log('inline script #1');
     15    var script=document.getElementsByTagName('script')[3];
     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>
     31 </html>