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

Side by Side Diff: LayoutTests/http/tests/eventsource/eventsource-cors-with-credentials-expected.txt

Issue 1196423003: Improve console log message for CORS failure (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 CONSOLE ERROR: EventSource cannot load http://127.0.0.1:8080/eventsource/resourc es/es-cors-credentials.php?count=1. A wildcard '*' cannot be used in the 'Access -Control-Allow-Origin' header when the credentials flag is true. Origin 'http:// 127.0.0.1:8000' is therefore not allowed access. 1 CONSOLE ERROR: EventSource cannot load http://127.0.0.1:8080/eventsource/resourc es/es-cors-credentials.php?count=1. Received response but it doesn't pass the ac cess control check: A wildcard '*' cannot be used in the 'Access-Control-Allow-O rigin' header when the credentials flag is true. Origin 'http://127.0.0.1:8000' is therefore not allowed access.
2 CONSOLE ERROR: EventSource cannot load http://127.0.0.1:8080/eventsource/resourc es/es-cors-credentials.php?count=2. A wildcard '*' cannot be used in the 'Access -Control-Allow-Origin' header when the credentials flag is true. Origin 'http:// 127.0.0.1:8000' is therefore not allowed access. 2 CONSOLE ERROR: EventSource cannot load http://127.0.0.1:8080/eventsource/resourc es/es-cors-credentials.php?count=2. Received response but it doesn't pass the ac cess control check: A wildcard '*' cannot be used in the 'Access-Control-Allow-O rigin' header when the credentials flag is true. Origin 'http://127.0.0.1:8000' is therefore not allowed access.
3 CONSOLE ERROR: EventSource cannot load http://127.0.0.1:8080/eventsource/resourc es/es-cors-credentials.php?count=3. Credentials flag is 'true', but the 'Access- Control-Allow-Credentials' header is ''. It must be 'true' to allow credentials. 3 CONSOLE ERROR: EventSource cannot load http://127.0.0.1:8080/eventsource/resourc es/es-cors-credentials.php?count=3. Received response but it doesn't pass the ac cess control check: Credentials flag is 'true', but the 'Access-Control-Allow-Cr edentials' header is ''. It must be 'true' to allow credentials.
4 Test that EventSource cross-origin requests with credentials fail until the corr ect CORS headers are sent. 4 Test that EventSource cross-origin requests with credentials fail until the corr ect CORS headers are sent.
5 5
6 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ". 6 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ".
7 7
8 8
9 PASS es = new EventSource("http://127.0.0.1:8080/eventsource/resources/es-cors-c redentials.php?count=1", {'withCredentials': true}) did not throw exception. 9 PASS es = new EventSource("http://127.0.0.1:8080/eventsource/resources/es-cors-c redentials.php?count=1", {'withCredentials': true}) did not throw exception.
10 PASS es.withCredentials is true 10 PASS es.withCredentials is true
11 PASS count != 4 && count != 5 is true 11 PASS count != 4 && count != 5 is true
12 PASS es = new EventSource("http://127.0.0.1:8080/eventsource/resources/es-cors-c redentials.php?count=2", {'withCredentials': true}) did not throw exception. 12 PASS es = new EventSource("http://127.0.0.1:8080/eventsource/resources/es-cors-c redentials.php?count=2", {'withCredentials': true}) did not throw exception.
13 PASS es.withCredentials is true 13 PASS es.withCredentials is true
14 PASS count != 4 && count != 5 is true 14 PASS count != 4 && count != 5 is true
15 PASS es = new EventSource("http://127.0.0.1:8080/eventsource/resources/es-cors-c redentials.php?count=3", {'withCredentials': true}) did not throw exception. 15 PASS es = new EventSource("http://127.0.0.1:8080/eventsource/resources/es-cors-c redentials.php?count=3", {'withCredentials': true}) did not throw exception.
16 PASS es.withCredentials is true 16 PASS es.withCredentials is true
17 PASS count != 4 && count != 5 is true 17 PASS count != 4 && count != 5 is true
18 PASS es = new EventSource("http://127.0.0.1:8080/eventsource/resources/es-cors-c redentials.php?count=4", {'withCredentials': true}) did not throw exception. 18 PASS es = new EventSource("http://127.0.0.1:8080/eventsource/resources/es-cors-c redentials.php?count=4", {'withCredentials': true}) did not throw exception.
19 PASS es.withCredentials is true 19 PASS es.withCredentials is true
20 PASS evt.origin.indexOf('http://127.0.0.1:8080') === 0 is true 20 PASS evt.origin.indexOf('http://127.0.0.1:8080') === 0 is true
21 PASS evt.data is "DATA1" 21 PASS evt.data is "DATA1"
22 PASS evt.lastEventId is "77" 22 PASS evt.lastEventId is "77"
23 PASS count is 5 23 PASS count is 5
24 PASS evt.origin.indexOf('http://127.0.0.1:8080') === 0 is true 24 PASS evt.origin.indexOf('http://127.0.0.1:8080') === 0 is true
25 PASS count is 5 25 PASS count is 5
26 PASS evt.data is "DATA2" 26 PASS evt.data is "DATA2"
27 PASS successfullyParsed is true 27 PASS successfullyParsed is true
28 28
29 TEST COMPLETE 29 TEST COMPLETE
30 30
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698