tor-browser

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

067.html (1431B)


      1 <!DOCTYPE html>
      2 <html><head>
      3        <title> scheduler: is a script with syntax error marked as "has run"? </title>
      4        <script src="/resources/testharness.js"></script>
      5        <script src="/resources/testharnessreport.js"></script>
      6        <script src="testlib/testlib.js"></script>
      7        <script>setup({allow_uncaught_exception:true})
      8        var t = async_test()
      9        </script>
     10        <script>
     11                log(This script will never run..
     12        </script>
     13 </head>
     14 <body>
     15 
     16        <div id="log">FAILED (This TC requires JavaScript enabled)</div>
     17 
     18        <script>t.step(function() {
     19                          log('inline script #1');
     20                          var script=document.getElementsByTagName('script')[3].cloneNode(true);
     21                          script.removeChild(script.firstChild);
     22                          script.appendChild(document.createTextNode( 'log("cloned script");' ));
     23                          document.body.appendChild( script );
     24                          log('end script #1');
     25                      })
     26        </script>
     27        <script type="text/javascript">
     28        t.step(function() {
     29                   log( 'inline script #2' );
     30               });
     31        function test() {
     32                assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'inline script #2']);
     33                t.done();
     34        }
     35        onload = t.step_func(test);
     36 </script>
     37 
     38 </body></html>