tor-browser

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

body-onerror-compile-error.html (976B)


      1 <!doctype html>
      2 <html>
      3 <head>
      4  <title>&lt;body onerror> - compile error in &lt;script></title>
      5  <script src="/resources/testharness.js"></script>
      6  <script src="/resources/testharnessreport.js"></script>
      7 </head>
      8  <script>
      9    setup({allow_uncaught_exception:true});
     10    var t = async_test();
     11    var t_col = async_test(document.title+' (column)');
     12    var ran = false;
     13  </script>
     14 <body onerror="
     15    t.step(function(){
     16        ran = true;
     17        assert_equals(typeof event, 'string', 'first arg');
     18        assert_equals(source, location.href, 'second arg');
     19        assert_equals(typeof lineno, 'number', 'third arg');
     20    });
     21    t_col.step(function() {
     22        assert_equals(typeof colno, 'number', 'fourth arg');
     23    });
     24    ">
     25  <div id=log></div>
     26  <script>
     27    for(;) {}
     28  </script>
     29  <script>
     30    t.step(function(){
     31        assert_true(ran, 'ran');
     32        t.done();
     33    });
     34    t_col.step(function(){
     35        t_col.done();
     36    });
     37  </script>
     38 </body>
     39 </html>