Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/errored.html

Issue 2555653002: [WIP Prototype] ES6 https://html.spec.whatwg.org/#fetch-a-single-module-script implementation (Closed)
Patch Set: rebased Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698