tor-browser

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

compile-error-cross-origin-setInterval.html (791B)


      1 <!doctype html>
      2 <html>
      3 <head>
      4  <title>window.onerror - compile error in cross-origin setInterval</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    var interval;
     15    window.addEventListener('error', t.step_func(e => {
     16        clearInterval(interval);
     17        ran = true;
     18        assert_equals(e.error.constructor, SyntaxError);
     19    }));
     20    var script = document.createElement('script');
     21    script.src = location.href.replace('://', '://www1.').replace(/\/[^\/]+$/, '/support/syntax-error-in-setInterval.js');
     22    document.body.appendChild(script);
     23  </script>
     24 </body>
     25 </html>