tor-browser

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

060.html (1076B)


      1 <!DOCTYPE html>
      2 <html><head>
      3  <title> scheduler: appending code to initially non-empty SCRIPT tag in DOM after setting textContent/innerHTML</title>
      4  <script src="/resources/testharness.js"></script>
      5  <script src="/resources/testharnessreport.js"></script>
      6  <script src="testlib/testlib.js"></script>
      7  <script>log('HEAD 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.innerHTML='';
     16    script.appendChild( document.createTextNode('log("injected script code 1");') );
     17    script.textContent='';
     18    script.appendChild( document.createTextNode('log("injected script code 2");') );
     19    log('end script #1');
     20  </script>
     21  <script type="text/javascript">
     22  log( 'inline script #2' );
     23  var t = async_test()
     24 
     25  function test() {
     26    assert_array_equals(eventOrder, ['HEAD script', 'inline script #1', 'end script #1', 'inline script #2']);
     27    t.done();
     28  }
     29  onload = t.step_func(test);
     30  </script>
     31 
     32 </body></html>