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

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

Issue 146853003: Correctly handle CORS access checks over cache-validating responses. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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: LayoutTests/http/tests/security/script-crossorigin-loads-cross-origin-conditional.html
diff --git a/LayoutTests/http/tests/security/script-crossorigin-loads-cross-origin-conditional.html b/LayoutTests/http/tests/security/script-crossorigin-loads-cross-origin-conditional.html
new file mode 100644
index 0000000000000000000000000000000000000000..44cce22b9d8c5a665f5941ffaef3d45148281438
--- /dev/null
+++ b/LayoutTests/http/tests/security/script-crossorigin-loads-cross-origin-conditional.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML>
+<p>Test that script elements that are fetched with CORS enabled and conditionally, pass the expected access controls.</p>
+<pre></pre>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+function log(msg)
+{
+ document.querySelector("pre").innerHTML = msg;
+}
+
+var count = 0;
+function finish(ok) {
+ // Called by the iframe upon completing the fetch of its script.
+ if (ok && count++ < 2) {
+ document.querySelector("iframe").contentWindow.location.reload();
+ return;
+ }
+ log((ok ? "PASS" : "FAIL") + ": crossorigin script repeatedly and conditionally loaded.");
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+</script>
+<iframe src="resources/iframe-crossorigin-script.html""></iframe>

Powered by Google App Engine
This is Rietveld 408576698