1
0
Fork 0
firefox/dom/base/test/jsmodules/test_dynamicImportErrorMessage.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

16 lines
517 B
HTML

<!DOCTYPE html>
<meta charset=utf-8>
<title>Test the error message from import()</title>
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script>
SimpleTest.waitForExplicitFinish();
async function testLoaded() {
await import("./404.js").catch((error) => {
ok(error instanceof TypeError, "Should be a TypeError.");
ok(error.message.match(/404.js/), "Should have the filename.");
SimpleTest.finish();
});
}
</script>
<body onload='testLoaded()'></body>