summaryrefslogtreecommitdiffstats
path: root/dom/base/test/jsmodules/importmaps/test_importMap_with_nonexisting_module.html
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/test/jsmodules/importmaps/test_importMap_with_nonexisting_module.html')
-rw-r--r--dom/base/test/jsmodules/importmaps/test_importMap_with_nonexisting_module.html25
1 files changed, 25 insertions, 0 deletions
diff --git a/dom/base/test/jsmodules/importmaps/test_importMap_with_nonexisting_module.html b/dom/base/test/jsmodules/importmaps/test_importMap_with_nonexisting_module.html
new file mode 100644
index 0000000000..57cfd5e5a1
--- /dev/null
+++ b/dom/base/test/jsmodules/importmaps/test_importMap_with_nonexisting_module.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>Test an import map with an nonexisting module specifier</title>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+
+<script type="importmap">
+{
+ "imports": {
+ "bare": "./good/module_0.mjs"
+ }
+}
+</script>
+
+
+<script>
+ SimpleTest.waitForExplicitFinish();
+
+ window.onerror = (event, src, lineno, colno, error) => {
+ ok(error instanceof TypeError, "Should be a TypeError");
+ SimpleTest.finish();
+ };
+
+</script>
+<script type="module" src="module_importMap_with_nonexisting_module.mjs"></script>