Index: third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/errored.html |
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/errored.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/errored.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e069e76df7e4e66d0e7b9acb4d48e5ed85abfe01 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/errored.html |
@@ -0,0 +1,29 @@ |
+<!doctype HTML> |
+<html> |
+<head> |
+ <title>html-script-module-errored</title> |
+ <script src="/resources/testharness.js"></script> |
+ <script src="/resources/testharnessreport.js"></script> |
+ |
+<script> |
+// The case where Step 6 of |
+// https://html.spec.whatwg.org/#internal-module-script-graph-fetching-procedure |
+// fails. In such cases, fetch a module script graph returns a non-null |
+// module script with instantiation state = "errored" |
+// and module record = null. |
+ |
+internals.runtimeFlags.moduleScriptsEnabled = true; |
+ |
+function errorHandler0(ev) |
+{ |
+ console.log('window onerror - should be called'); |
+ console.log("Message = " + ev.message); |
+} |
+window.addEventListener("error", errorHandler0); |
+ |
+</script> |
+<script type="module" src="errored-root.js" onerror="console.log('script onerror - should NOT be called')" onload="console.log('script onload - should be called')"></script> |
+<script> |
+testRunner.waitUntilDone(); |
+setTimeout(() => {testRunner.notifyDone();}, 100); |
+</script> |