tor-browser

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

068.html (1033B)


      1 <!DOCTYPE html>
      2 <html><head>
      3        <title> scheduler: external script and parsing of markup added with document.write </title>
      4        <script src="/resources/testharness.js"></script>
      5        <script src="/resources/testharnessreport.js"></script>
      6        <script src="testlib/testlib.js"></script>
      7 
      8 </head>
      9 <body>
     10 
     11        <div id="log">FAILED (This TC requires JavaScript enabled)</div>
     12 
     13        <script>
     14          log('inline script #1');
     15          document.write('<script src="scripts/find-foo.js">log(\'inline code in external script (not expected to run!!)\')<\/script>' + '<div id="foo"></div>');
     16          log('end script #1');
     17 
     18          var t = async_test()
     19 
     20 
     21          function test() {
     22             if(!window.findFooLoaded) {
     23                 return setTimeout(t.step_func(test),200);
     24             }
     25             assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'found #foo element: NO']);
     26             t.done();
     27          }
     28          onload = t.step_func(test)
     29        </script>
     30 
     31 </body></html>