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

Unified Diff: net/websockets/websocket_stream_test.cc

Issue 2628333003: Cancel URLRequest with an appropriate code when WebSocket handshake succeeds (Closed)
Patch Set: fix Created 3 years, 11 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
« no previous file with comments | « net/websockets/websocket_stream.cc ('k') | net/websockets/websocket_test_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_stream_test.cc
diff --git a/net/websockets/websocket_stream_test.cc b/net/websockets/websocket_stream_test.cc
index 091c28db1635b07a638324ea13770f0c394070f0..78bda666dfe37cb20ee70bd0d57f950a5308be88 100644
--- a/net/websockets/websocket_stream_test.cc
+++ b/net/websockets/websocket_stream_test.cc
@@ -337,6 +337,8 @@ TEST_F(WebSocketStreamCreateTest, SimpleSuccess) {
EXPECT_TRUE(stream_);
EXPECT_TRUE(request_info_);
EXPECT_TRUE(response_info_);
+ EXPECT_EQ(ERR_WEBSOCKET_HANDSHAKE_SUCCESS,
+ url_request_context_host_.network_delegate().last_error());
}
TEST_F(WebSocketStreamCreateTest, HandshakeInfo) {
@@ -483,6 +485,8 @@ TEST_F(WebSocketStreamCreateTest, UnsolicitedSubProtocol) {
"Response must not include 'Sec-WebSocket-Protocol' header "
"if not present in request: chatv20.chromium.org",
failure_message());
+ EXPECT_EQ(ERR_INVALID_RESPONSE,
+ url_request_context_host_.network_delegate().last_error());
}
// Missing sub-protocol response is rejected.
« no previous file with comments | « net/websockets/websocket_stream.cc ('k') | net/websockets/websocket_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698