summaryrefslogtreecommitdiffstats
path: root/dom/base/test/jsmodules/test_importResolveFailed.html
blob: 7df521d0528af4f4726ea629ab017f89724d177d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!DOCTYPE html>
<meta charset=utf-8>
<title>Test error thrown when an import cannot be resolved</title>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script>
  var hadTypeError = false;

  SimpleTest.waitForExplicitFinish();
  window.onerror = handleError;

  function handleError(message, url, line, column, error) {
    hadTypeError = error instanceof TypeError;
  }

  function testError() {
    ok(hadTypeError, 'Check that a TypeError was thrown');
    SimpleTest.finish();
  }
</script>
<script type="module" src="module_badImport.js"></script>
<body onload='testError()'></body>