tor-browser

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

003.html (784B)


      1 <!doctype html>
      2 <title>shared worker, no error event on worker or port</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <div id=log></div>
      6 <script>
      7 setup({allow_uncaught_exception:true});
      8 async_test(function() {
      9  window.onerror = this.step_func(function(a) {
     10    assert_unreached('window.onerror invoked: ' + a);
     11  });
     12  var worker = new SharedWorker('003.js', '');
     13  worker.addEventListener('error', this.step_func(function(e) {
     14    assert_unreached('error on worker');
     15  }), false);
     16  worker.port.addEventListener('error', this.step_func(function(e) {
     17    assert_unreached('error on port');
     18  }), false);
     19  worker.port.onmessage = this.step_func_done(function(e) {
     20    assert_equals(e.data, '');
     21  });
     22 });
     23 </script>