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

Unified Diff: LayoutTests/http/tests/eventsource/eventsource-content-type-charset-expected.txt

Issue 347043002: Rework EventSource tests for better Worker test coverage. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move out CORS tests 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/eventsource/eventsource-content-type-charset-expected.txt
diff --git a/LayoutTests/http/tests/eventsource/eventsource-content-type-charset-expected.txt b/LayoutTests/http/tests/eventsource/eventsource-content-type-charset-expected.txt
index 53fe0ddbfcf82a474cac1358faaa0b8b367e29e6..865332c4b456777cdd6004708038c72f25bdfdf6 100644
--- a/LayoutTests/http/tests/eventsource/eventsource-content-type-charset-expected.txt
+++ b/LayoutTests/http/tests/eventsource/eventsource-content-type-charset-expected.txt
@@ -1,12 +1,36 @@
CONSOLE ERROR: EventSource's response has a charset ("windows-1251") that is not UTF-8. Aborting the connection.
CONSOLE ERROR: EventSource's response has a MIME type ("text/event-stream-foobar") that is not "text/event-stream". Aborting the connection.
-Test for bug 45372: https://bugs.webkit.org/show_bug.cgi?id=45372
+Test EventSource with an event-stream with a Content-Type with a charset is still recognized.
-Test EventSource with an event-stream with a Content-Type with a charset is still recognized. You should see 5 PASSED below.
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASSED: text/event-stream; charset=UTF-8
-PASSED: text/event-stream; charset=windows-1251
-PASSED: text/event-stream; charset=utf-8
-PASSED: text/event-stream; charset="UTF-8"
-PASSED: text/event-stream-foobar;
+
+PASS es = new EventSource("/eventsource/resources/response-content-type-charset.php?contentType=text/event-stream%3B%20charset%3DUTF-8") did not throw exception.
+Content type: text/event-stream; charset=UTF-8
+PASS !!es.sawError is false
+PASS es.sawMessage is true
+PASS es.sawOpen is true
+PASS es = new EventSource("/eventsource/resources/response-content-type-charset.php?contentType=text/event-stream%3B%20charset%3Dwindows-1251") did not throw exception.
+Content type: text/event-stream; charset=windows-1251
+PASS es.sawError is true
+PASS !!es.sawMessage is false
+PASS !!es.sawOpen is false
+PASS es = new EventSource("/eventsource/resources/response-content-type-charset.php?contentType=text/event-stream%3B%20charset%3Dutf-8") did not throw exception.
+Content type: text/event-stream; charset=utf-8
+PASS !!es.sawError is false
+PASS es.sawMessage is true
+PASS es.sawOpen is true
+PASS es = new EventSource("/eventsource/resources/response-content-type-charset.php?contentType=text/event-stream%3B%20charset%3D%22UTF-8%22") did not throw exception.
+Content type: text/event-stream; charset="UTF-8"
+PASS !!es.sawError is false
+PASS es.sawMessage is true
+PASS es.sawOpen is true
+PASS es = new EventSource("/eventsource/resources/response-content-type-charset.php?contentType=text/event-stream-foobar%3B") did not throw exception.
+Content type: text/event-stream-foobar;
+PASS es.sawError is true
+PASS !!es.sawMessage is false
+PASS !!es.sawOpen is false
+PASS successfullyParsed is true
+
+TEST COMPLETE

Powered by Google App Engine
This is Rietveld 408576698