| Index: third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/specifier-error.html
|
| diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/specifier-error.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/specifier-error.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2cc393eddf9c53d56e037083b3320dbac1b54204
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/specifier-error.html
|
| @@ -0,0 +1,20 @@
|
| +<!DOCTYPE html>
|
| +<title>Handling of invalid specifiers</title>
|
| +
|
| +<script src="/resources/testharness.js"></script>
|
| +<script src="/resources/testharnessreport.js"></script>
|
| +<script>
|
| + window.log = [];
|
| +
|
| + window.addEventListener("error", ev => log.push(ev.error));
|
| +
|
| + const test_load = async_test(
|
| + "Test that invalid module specifier leads to TypeError on window.");
|
| + window.addEventListener("load", test_load.step_func_done(ev => {
|
| + assert_equals(log.length, 1);
|
| + assert_equals(log[0].constructor, TypeError);
|
| + }));
|
| +
|
| + function unreachable() { log.push("unexpected"); }
|
| +</script>
|
| +<script type="module" src="./bad-module-specifier.js" onerror="unreachable()"></script>
|
|
|