tor-browser

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

test_importResolveFailed.html (668B)


      1 <!DOCTYPE html>
      2 <meta charset=utf-8>
      3 <title>Test error thrown when an import cannot be resolved</title>
      4 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
      5 <script>
      6  var hadTypeError = false;
      7 
      8  SimpleTest.waitForExplicitFinish();
      9  window.onerror = handleError;
     10 
     11  function handleError(message, url, line, column, error) {
     12    hadTypeError = error instanceof TypeError;
     13  }
     14 
     15  // eslint-disable-next-line no-unused-vars
     16  function testError() {
     17    ok(hadTypeError, 'Check that a TypeError was thrown');
     18    SimpleTest.finish();
     19  }
     20 </script>
     21 <script type="module" src="module_badImport.mjs"></script>
     22 <body onload='testError()'></body>