tor-browser

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

079.html (845B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <title> setting location to javascript URL from event handler </title>
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <script src="testlib/testlib.js"></script>
      8 <script type="text/javascript">
      9 log('inline script #1');
     10 var t = async_test()
     11 
     12 onload = t.step_func(function() {
     13  log('onload handler');
     14  document.getElementById("log").textContent = 'please wait...';
     15  window.location='javascript:log("javascript: URL")';
     16  setTimeout(t.step_func(function(){
     17    log('timeout');
     18    assert_array_equals(eventOrder, ['inline script #1', 'onload handler', 'onload ends', 'javascript: URL', 'timeout']);
     19    t.done();
     20  }), 200);
     21  log('onload ends');
     22 });
     23 </script>
     24 </head>
     25 <body>
     26 <div id="log">FAILED (This TC requires JavaScript enabled)</div>
     27 </body>
     28 </html>