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

Unified Diff: LayoutTests/http/tests/security/img-crossorigin-redirect-no-cors-expected.txt

Issue 149643003: Improve handling of CORS redirects for some resource loads. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use canRequest() when checking redirect origin; remove redundant null checks. Created 6 years, 10 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/img-crossorigin-redirect-no-cors-expected.txt
diff --git a/LayoutTests/http/tests/security/img-crossorigin-redirect-no-cors-expected.txt b/LayoutTests/http/tests/security/img-crossorigin-redirect-no-cors-expected.txt
new file mode 100644
index 0000000000000000000000000000000000000000..36f40e09e2a042d6c148544240e8fc3c6e790c83
--- /dev/null
+++ b/LayoutTests/http/tests/security/img-crossorigin-redirect-no-cors-expected.txt
@@ -0,0 +1,19 @@
+CONSOLE ERROR: Redirect at origin 'http://localhost:8000' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8000' is therefore not allowed access.
+CONSOLE ERROR: Redirect at origin 'http://localhost:8000' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8000' is therefore not allowed access.
+CONSOLE ERROR: Redirect at origin 'http://localhost:8000' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8000' is therefore not allowed access.
+CONSOLE ERROR: Redirect at origin 'http://localhost:8000' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8000' is therefore not allowed access.
+Testing the handling of CORS-enabled fetch in the presence of 'No CORS' redirects.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS/FAIL descriptions are of the form, 'CORS request type': 'redirect CORS type' => 'resource'
+
+PASS: Anonymous request: no-CORS => no-CORS image resource.
+PASS: Anonymous request: no-CORS => anonymous-CORS image resource.
+PASS: Credentialled request: no-CORS => credential-CORS image resource (same origin.)
+PASS: Credentialled request: no-CORS => credential-CORS image resource (cross origin.)
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Powered by Google App Engine
This is Rietveld 408576698