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

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

Issue 345813005: Rework EventSource CORS tests to be usable from Workers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Generalize redirect.php?cors_enabled to cors_allow_origin Created 6 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://localhost:8000/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. 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://localhost:8000/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. 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.
3 CONSOLE ERROR: EventSource cannot load http://localhost:8000/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. Credentials flag is 'true', but the 'Access- Control-Allow-Credentials' 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. Should print a series of PASS messages followed by DO NE. 4 Test that EventSource cross-origin requests with credentials fail until the corr ect CORS headers are sent.
5 5
6 PASS: got error event and readyState is CLOSED 6 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ".
7 PASS: got error event and readyState is CLOSED
8 PASS: got error event and readyState is CLOSED
9 PASS: got cross-origin message event with data "DATA1" and lastEventId "77"
10 PASS: got cross-origin message event with data "DATA2"
11 DONE
12 7
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.
10 PASS es.withCredentials 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.
13 PASS es.withCredentials 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.
16 PASS es.withCredentials 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.
19 PASS es.withCredentials is true
20 PASS evt.origin.indexOf('http://127.0.0.1:8080') === 0 is true
21 PASS evt.data is "DATA1"
22 PASS evt.lastEventId is "77"
23 PASS count is 5
24 PASS evt.origin.indexOf('http://127.0.0.1:8080') === 0 is true
25 PASS count is 5
26 PASS evt.data is "DATA2"
27 PASS successfullyParsed is true
28
29 TEST COMPLETE
30
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698