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

Unified Diff: net/websockets/websocket_stream_test.cc

Issue 2247003003: Revert HTTP/0.9 removal (https://codereview.chromium.org/2144803002/) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add back new error code Created 4 years, 4 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: net/websockets/websocket_stream_test.cc
diff --git a/net/websockets/websocket_stream_test.cc b/net/websockets/websocket_stream_test.cc
index d6d6202c87794ce49e319108b49b60f5e9eef261..f3938b3482014f41d76406205c5943cde08fe53a 100644
--- a/net/websockets/websocket_stream_test.cc
+++ b/net/websockets/websocket_stream_test.cc
@@ -688,7 +688,8 @@ TEST_F(WebSocketStreamCreateTest, RedirectsRejected) {
// Malformed responses should be rejected. HttpStreamParser will accept just
// about any garbage in the middle of the headers. To make it give up, the junk
-// has to be at the start of the response.
+// has to be at the start of the response. Even then, it just gets treated as an
+// HTTP/0.9 response.
TEST_F(WebSocketStreamCreateTest, MalformedResponse) {
static const char kMalformedResponse[] =
"220 mx.google.com ESMTP\r\n"
@@ -702,7 +703,7 @@ TEST_F(WebSocketStreamCreateTest, MalformedResponse) {
LocalhostUrl(), "", "", kMalformedResponse);
WaitUntilConnectDone();
EXPECT_TRUE(has_failed());
- EXPECT_EQ("Error during WebSocket handshake: net::ERR_INVALID_HTTP_RESPONSE",
+ EXPECT_EQ("Error during WebSocket handshake: Invalid status line",
failure_message());
}

Powered by Google App Engine
This is Rietveld 408576698