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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLScriptElement/script-sync-load-failure.html

Issue 2010983002: Test that failed sync scripts do not block later ones. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/fast/dom/HTMLScriptElement/script-sync-load-failure.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/HTMLScriptElement/script-sync-load-failure.html b/third_party/WebKit/LayoutTests/fast/dom/HTMLScriptElement/script-sync-load-failure.html
new file mode 100644
index 0000000000000000000000000000000000000000..d71061229f64694f1aae477f99bc91a0c1c09b58
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/HTMLScriptElement/script-sync-load-failure.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script>
+function syncLoad(url, onload) {
+ var script = document.createElement("script");
+ script.async = false;
+ script.onload = onload;
+ script.src = url;
+ document.head.appendChild(script);
+}
+</script>
+</head>
+<body>
+<script>
+description("Sync scripts that fail to load should not block later sync scripts from executing.");
+
+window.jsTestIsAsync = true;
+
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+function nonExistentJS() {
+ return "http://localhost/non-existing-" + Math.random() + ".js";
+}
+
+for (var i = 0; i < 10; ++i)
+ syncLoad(nonExistentJS());
+
+syncLoad("resources/success.js", finishJSTest);
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698