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

Unified Diff: LayoutTests/http/tests/security/script-crossorigin-loads-cross-origin-preload.html

Issue 104943004: Have preloader handle crossorigin resources better. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Initialize m_allowCredentials in the constructor Created 7 years 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/script-crossorigin-loads-cross-origin-preload-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/security/script-crossorigin-loads-cross-origin-preload.html
diff --git a/LayoutTests/http/tests/security/script-crossorigin-loads-cross-origin-preload.html b/LayoutTests/http/tests/security/script-crossorigin-loads-cross-origin-preload.html
new file mode 100644
index 0000000000000000000000000000000000000000..0a4545f7816c6d4a3998413a2f513308b52c777b
--- /dev/null
+++ b/LayoutTests/http/tests/security/script-crossorigin-loads-cross-origin-preload.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<html>
+<body>
+<p>Test that a script element with a crossorigin attribute (pre)loads a cross-origin script correctly.</p>
+<pre></pre>
+<script>
+var result = "FAIL";
+</script>
+<!-- This script should preload using CORS. -->
+<script crossorigin src="http://localhost:8000/security/resources/cors-script.php?cors=true&value=PASS"></script>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+function loaded() {
+ document.querySelector("pre").innerHTML = result;
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+window.onload = loaded;
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/script-crossorigin-loads-cross-origin-preload-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698