tor-browser

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

runtime-error-cross-origin-setTimeout.html (748B)


      1 <!doctype html>
      2 <html>
      3 <head>
      4  <title>window.onerror - runtime error in cross-origin setTimeout</title>
      5  <script src="/resources/testharness.js"></script>
      6  <script src="/resources/testharnessreport.js"></script>
      7 </head>
      8 <body>
      9  <div id=log></div>
     10  <script>
     11    setup({allow_uncaught_exception:true});
     12    var t = async_test();
     13    var ran = false;
     14    window.addEventListener('error', t.step_func(e => {
     15        ran = true;
     16        assert_equals(e.error.constructor, ReferenceError);
     17    }));
     18    var script = document.createElement('script');
     19    script.src = location.href.replace('://', '://www1.').replace(/\/[^\/]+$/, '/support/undefined-variable-in-setTimeout.js');
     20    document.body.appendChild(script);
     21  </script>
     22 </body>
     23 </html>