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

Unified Diff: LayoutTests/platform/linux/http/tests/xmlhttprequest/origin-exact-matching-expected.txt

Issue 109773002: Improve precision of error messages from failed CORS checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
Index: LayoutTests/platform/linux/http/tests/xmlhttprequest/origin-exact-matching-expected.txt
diff --git a/LayoutTests/platform/linux/http/tests/xmlhttprequest/origin-exact-matching-expected.txt b/LayoutTests/platform/linux/http/tests/xmlhttprequest/origin-exact-matching-expected.txt
index 96d39178a17ba6b35b1be49ba0ffb4695009cbc1..d5c858bd0f0cde23007a66d6dfef0097932fb4a9 100644
--- a/LayoutTests/platform/linux/http/tests/xmlhttprequest/origin-exact-matching-expected.txt
+++ b/LayoutTests/platform/linux/http/tests/xmlhttprequest/origin-exact-matching-expected.txt
@@ -1,38 +1,42 @@
-CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Fwww2.localhost%3A8000. The 'Access-Control-Allow-Origin' whitelists only 'http://www2.localhost:8000'. Origin 'http://localhost:8000' is not in the list, and is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Fwww2.localhost%3A8000. The 'Access-Control-Allow-Origin' header has a value 'http://www2.localhost:8000' that is not equal to the supplied origin. Origin 'http://localhost:8000' is therefore not allowed access.
CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=%2F%2Flocalhost%3A8000. The 'Access-Control-Allow-Origin' header contains the invalid value '//localhost:8000'. Origin 'http://localhost:8000' is therefore not allowed access.
CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=%3A%2F%2Flocalhost%3A8000. The 'Access-Control-Allow-Origin' header contains the invalid value '://localhost:8000'. Origin 'http://localhost:8000' is therefore not allowed access.
-CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=ftp%3A%2F%2Flocalhost%3A8000. The 'Access-Control-Allow-Origin' whitelists only 'ftp://localhost:8000'. Origin 'http://localhost:8000' is not in the list, and is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=ftp%3A%2F%2Flocalhost%3A8000. The 'Access-Control-Allow-Origin' header has a value 'ftp://localhost:8000' that is not equal to the supplied origin. Origin 'http://localhost:8000' is therefore not allowed access.
CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%3A%2F%2Flocalhost%3A8000. The 'Access-Control-Allow-Origin' header contains the invalid value 'http:://localhost:8000'. Origin 'http://localhost:8000' is therefore not allowed access.
-CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2Flocalhost%3A8000. The 'Access-Control-Allow-Origin' whitelists only 'http:/localhost:8000'. Origin 'http://localhost:8000' is not in the list, and is therefore not allowed access.
-CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3Alocalhost%3A8000. The 'Access-Control-Allow-Origin' whitelists only 'http:localhost:8000'. Origin 'http://localhost:8000' is not in the list, and is therefore not allowed access.
-CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=localhost%3A8000. The 'Access-Control-Allow-Origin' whitelists only 'localhost:8000'. Origin 'http://localhost:8000' is not in the list, and is therefore not allowed access.
-CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Flocalhost%3A8000%3F. The 'Access-Control-Allow-Origin' whitelists only 'http://localhost:8000?'. Origin 'http://localhost:8000' is not in the list, and is therefore not allowed access.
-CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Flocalhost%3A8000%2F. The 'Access-Control-Allow-Origin' whitelists only 'http://localhost:8000/'. Origin 'http://localhost:8000' is not in the list, and is therefore not allowed access.
-CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Flocalhost%3A8000%20%2F. The 'Access-Control-Allow-Origin' header contains the invalid value 'http://localhost:8000 /'. Origin 'http://localhost:8000' is therefore not allowed access.
-CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Flocalhost%3A8000%23. The 'Access-Control-Allow-Origin' whitelists only 'http://localhost:8000#'. Origin 'http://localhost:8000' is not in the list, and is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2Flocalhost%3A8000. The 'Access-Control-Allow-Origin' header has a value 'http:/localhost:8000' that is not equal to the supplied origin. Origin 'http://localhost:8000' is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3Alocalhost%3A8000. The 'Access-Control-Allow-Origin' header has a value 'http:localhost:8000' that is not equal to the supplied origin. Origin 'http://localhost:8000' is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=localhost%3A8000. The 'Access-Control-Allow-Origin' header has a value 'localhost:8000' that is not equal to the supplied origin. Origin 'http://localhost:8000' is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Flocalhost%3A8000%3F. The 'Access-Control-Allow-Origin' header has a value 'http://localhost:8000?' that is not equal to the supplied origin. Origin 'http://localhost:8000' is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Flocalhost%3A8000%2F. The 'Access-Control-Allow-Origin' header has a value 'http://localhost:8000/' that is not equal to the supplied origin. Origin 'http://localhost:8000' is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Flocalhost%3A8000%20%2F. The 'Access-Control-Allow-Origin' header contains multiple values 'http://localhost:8000 /', but only one is allowed. Origin 'http://localhost:8000' is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Flocalhost%3A8000%23. The 'Access-Control-Allow-Origin' header has a value 'http://localhost:8000#' that is not equal to the supplied origin. Origin 'http://localhost:8000' is therefore not allowed access.
CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Flocalhost%3A8000%2523. The 'Access-Control-Allow-Origin' header contains the invalid value 'http://localhost:8000%23'. Origin 'http://localhost:8000' is therefore not allowed access.
CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Flocalhost%3A8000%3A80. The 'Access-Control-Allow-Origin' header contains the invalid value 'http://localhost:8000:80'. Origin 'http://localhost:8000' is therefore not allowed access.
-CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Flocalhost%3A8000%2C%20*. The 'Access-Control-Allow-Origin' header contains the invalid value 'http://localhost:8000, *'. Origin 'http://localhost:8000' is therefore not allowed access.
-CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=HTTP%3A%2F%2FLOCALHOST%3A8000. The 'Access-Control-Allow-Origin' whitelists only 'HTTP://LOCALHOST:8000'. Origin 'http://localhost:8000' is not in the list, and is therefore not allowed access.
-CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=HTTP%3A%2F%2Flocalhost%3A8000. The 'Access-Control-Allow-Origin' whitelists only 'HTTP://localhost:8000'. Origin 'http://localhost:8000' is not in the list, and is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Flocalhost%3A8000%2C%20*. The 'Access-Control-Allow-Origin' header contains multiple values 'http://localhost:8000, *', but only one is allowed. Origin 'http://localhost:8000' is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=HTTP%3A%2F%2FLOCALHOST%3A8000. The 'Access-Control-Allow-Origin' header has a value 'HTTP://LOCALHOST:8000' that is not equal to the supplied origin. Origin 'http://localhost:8000' is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=HTTP%3A%2F%2Flocalhost%3A8000. The 'Access-Control-Allow-Origin' header has a value 'HTTP://localhost:8000' that is not equal to the supplied origin. Origin 'http://localhost:8000' is therefore not allowed access.
CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=-. The 'Access-Control-Allow-Origin' header contains the invalid value '-'. Origin 'http://localhost:8000' is therefore not allowed access.
CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=**. The 'Access-Control-Allow-Origin' header contains the invalid value '**'. Origin 'http://localhost:8000' is therefore not allowed access.
CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=%00*. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8000' is therefore not allowed access.
CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=%27*%27. The 'Access-Control-Allow-Origin' header contains the invalid value ''*''. Origin 'http://localhost:8000' is therefore not allowed access.
CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=%22*%22. The 'Access-Control-Allow-Origin' header contains the invalid value '"*"'. Origin 'http://localhost:8000' is therefore not allowed access.
-CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=*%20*. The 'Access-Control-Allow-Origin' header contains the invalid value '* *'. Origin 'http://localhost:8000' is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=*%20*. The 'Access-Control-Allow-Origin' header contains multiple values '* *', but only one is allowed. Origin 'http://localhost:8000' is therefore not allowed access.
CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=*http%3A%2F%2F*. The 'Access-Control-Allow-Origin' header contains the invalid value '*http://*'. Origin 'http://localhost:8000' is therefore not allowed access.
CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=*http%3A%2F%2Flocalhost%3A8000. The 'Access-Control-Allow-Origin' header contains the invalid value '*http://localhost:8000'. Origin 'http://localhost:8000' is therefore not allowed access.
-CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=*%20http%3A%2F%2Flocalhost%3A8000. The 'Access-Control-Allow-Origin' header contains the invalid value '* http://localhost:8000'. Origin 'http://localhost:8000' is therefore not allowed access.
-CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=*%2C%20http%3A%2F%2Flocalhost%3A8000. The 'Access-Control-Allow-Origin' header contains the invalid value '*, http://localhost:8000'. Origin 'http://localhost:8000' is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=*%20http%3A%2F%2Flocalhost%3A8000. The 'Access-Control-Allow-Origin' header contains multiple values '* http://localhost:8000', but only one is allowed. Origin 'http://localhost:8000' is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=*%2C%20http%3A%2F%2Flocalhost%3A8000. The 'Access-Control-Allow-Origin' header contains multiple values '*, http://localhost:8000', but only one is allowed. Origin 'http://localhost:8000' is therefore not allowed access.
CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=%00http%3A%2F%2Flocalhost%3A8000. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8000' is therefore not allowed access.
-CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=null%20http%3A%2F%2Flocalhost%3A8000. The 'Access-Control-Allow-Origin' header contains the invalid value 'null http://localhost:8000'. Origin 'http://localhost:8000' is therefore not allowed access.
-CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Fexample.net. The 'Access-Control-Allow-Origin' whitelists only 'http://example.net'. Origin 'http://localhost:8000' is not in the list, and is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=null%20http%3A%2F%2Flocalhost%3A8000. The 'Access-Control-Allow-Origin' header contains multiple values 'null http://localhost:8000', but only one is allowed. Origin 'http://localhost:8000' is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Fexample.net. The 'Access-Control-Allow-Origin' header has a value 'http://example.net' that is not equal to the supplied origin. Origin 'http://localhost:8000' is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Fexample.net%20http%3A%2F%2Flocalhost%3A8000. The 'Access-Control-Allow-Origin' header contains multiple values 'http://example.net http://localhost:8000', but only one is allowed. Origin 'http://localhost:8000' is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Fexample.net%2C%20http%3A%2F%2Flocalhost%3A8000. The 'Access-Control-Allow-Origin' header contains multiple values 'http://example.net, http://localhost:8000', but only one is allowed. Origin 'http://localhost:8000' is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origins=http%3A%2F%2Fexample.net,http%3A%2F%2Flocalhost%3A8000. The 'Access-Control-Allow-Origin' header contains multiple values 'http://example.net, http://localhost:8000', but only one is allowed. Origin 'http://localhost:8000' is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origins=http%3A%2F%2Flocalhost%3A8000,http%3A%2F%2Flocalhost%3A8000. The 'Access-Control-Allow-Origin' header contains multiple values 'http://localhost:8000, http://localhost:8000', but only one is allowed. Origin 'http://localhost:8000' is therefore not allowed access.
CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=null. The 'Access-Control-Allow-Origin' header contains the invalid value 'null'. Origin 'http://localhost:8000' is therefore not allowed access.
CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8000' is therefore not allowed access.
-CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Flocalhost%3A8000%2Fxmlhttprequest%2Fresources%2Forigin-exact-matching-iframe.html. The 'Access-Control-Allow-Origin' whitelists only 'http://localhost:8000/xmlhttprequest/resources/origin-exact-matching-iframe.html'. Origin 'http://localhost:8000' is not in the list, and is therefore not allowed access.
-CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Flocalhost%3A8000%2Fxmlhttprequest%2Fresources%2F. The 'Access-Control-Allow-Origin' whitelists only 'http://localhost:8000/xmlhttprequest/resources/'. Origin 'http://localhost:8000' is not in the list, and is therefore not allowed access.
-CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Flocalhost%3A8000%2Fxmlhttprequest%2Fresources%2Forigin-exact-matching-iframe.html. The 'Access-Control-Allow-Origin' whitelists only 'http://localhost:8000/xmlhttprequest/resources/origin-exact-matching-iframe.html'. Origin 'http://localhost:8000' is not in the list, and is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Flocalhost%3A8000%2Fxmlhttprequest%2Fresources%2Forigin-exact-matching-iframe.html. The 'Access-Control-Allow-Origin' header has a value 'http://localhost:8000/xmlhttprequest/resources/origin-exact-matching-iframe.html' that is not equal to the supplied origin. Origin 'http://localhost:8000' is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Flocalhost%3A8000%2Fxmlhttprequest%2Fresources%2F. The 'Access-Control-Allow-Origin' header has a value 'http://localhost:8000/xmlhttprequest/resources/' that is not equal to the supplied origin. Origin 'http://localhost:8000' is therefore not allowed access.
+CONSOLE ERROR: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=http%3A%2F%2Flocalhost%3A8000%2Fxmlhttprequest%2Fresources%2Forigin-exact-matching-iframe.html. The 'Access-Control-Allow-Origin' header has a value 'http://localhost:8000/xmlhttprequest/resources/origin-exact-matching-iframe.html' that is not equal to the supplied origin. Origin 'http://localhost:8000' is therefore not allowed access.
--------
@@ -117,6 +121,14 @@ Should disallow origin: 'null http://localhost:8000'
PASS xhr.send(null) threw exception NetworkError: A network error occurred..
Should disallow origin: 'http://example.net'
PASS xhr.send(null) threw exception NetworkError: A network error occurred..
+Should disallow origin: 'http://example.net http://localhost:8000'
+PASS xhr.send(null) threw exception NetworkError: A network error occurred..
+Should disallow origin: 'http://example.net, http://localhost:8000'
+PASS xhr.send(null) threw exception NetworkError: A network error occurred..
+Should disallow origin: 'http://example.net,http://localhost:8000'
+PASS xhr.send(null) threw exception NetworkError: A network error occurred..
+Should disallow origin: 'http://localhost:8000,http://localhost:8000'
+PASS xhr.send(null) threw exception NetworkError: A network error occurred..
Should disallow origin: 'null'
PASS xhr.send(null) threw exception NetworkError: A network error occurred..
Should disallow origin: ''

Powered by Google App Engine
This is Rietveld 408576698