tor-browser

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

runtime-error-in-window-onerror.html (604B)


      1 <!doctype html>
      2 <html>
      3 <head>
      4  <title>runtime error in window.onerror</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 = 0;
     14    window.onerror = function(){
     15        ran++;
     16        undefined_variable_in_onerror;
     17    };
     18  </script>
     19  <script>
     20    undefined_variable;
     21  </script>
     22  <script>
     23    t.step(function(){
     24        assert_equals(ran, 1, 'ran');
     25        t.done();
     26    });
     27  </script>
     28 </body>
     29 </html>