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

Unified Diff: net/socket_stream/socket_stream_unittest.cc

Issue 10668018: Websocket should fire 'error' event if no server available (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: For reland (tyoshino) Created 7 years, 8 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/socket_stream/socket_stream.cc ('k') | webkit/glue/websocketstreamhandle_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket_stream/socket_stream_unittest.cc
diff --git a/net/socket_stream/socket_stream_unittest.cc b/net/socket_stream/socket_stream_unittest.cc
index e98e0dfeb227ab0599588c71c4d66e5a1440156f..b0734fc5fb5b0bd7d98e04fca93560e40458993e 100644
--- a/net/socket_stream/socket_stream_unittest.cc
+++ b/net/socket_stream/socket_stream_unittest.cc
@@ -356,7 +356,7 @@ TEST_F(SocketStreamTest, CloseFlushPendingWrite) {
test_callback.WaitForResult();
const std::vector<SocketStreamEvent>& events = delegate->GetSeenEvents();
- ASSERT_EQ(8U, events.size());
+ ASSERT_EQ(7U, events.size());
EXPECT_EQ(SocketStreamEvent::EVENT_START_OPEN_CONNECTION,
events[0].event_type);
@@ -365,9 +365,7 @@ TEST_F(SocketStreamTest, CloseFlushPendingWrite) {
EXPECT_EQ(SocketStreamEvent::EVENT_RECEIVED_DATA, events[3].event_type);
EXPECT_EQ(SocketStreamEvent::EVENT_SENT_DATA, events[4].event_type);
EXPECT_EQ(SocketStreamEvent::EVENT_SENT_DATA, events[5].event_type);
- EXPECT_EQ(SocketStreamEvent::EVENT_ERROR, events[6].event_type);
- EXPECT_EQ(ERR_CONNECTION_CLOSED, events[6].error_code);
- EXPECT_EQ(SocketStreamEvent::EVENT_CLOSE, events[7].event_type);
+ EXPECT_EQ(SocketStreamEvent::EVENT_CLOSE, events[6].event_type);
}
TEST_F(SocketStreamTest, ExceedMaxPendingSendAllowed) {
@@ -645,7 +643,7 @@ TEST_F(SocketStreamTest, IOPending) {
EXPECT_EQ(OK, test_callback.WaitForResult());
const std::vector<SocketStreamEvent>& events = delegate->GetSeenEvents();
- ASSERT_EQ(8U, events.size());
+ ASSERT_EQ(7U, events.size());
EXPECT_EQ(SocketStreamEvent::EVENT_START_OPEN_CONNECTION,
events[0].event_type);
@@ -654,9 +652,7 @@ TEST_F(SocketStreamTest, IOPending) {
EXPECT_EQ(SocketStreamEvent::EVENT_RECEIVED_DATA, events[3].event_type);
EXPECT_EQ(SocketStreamEvent::EVENT_SENT_DATA, events[4].event_type);
EXPECT_EQ(SocketStreamEvent::EVENT_SENT_DATA, events[5].event_type);
- EXPECT_EQ(SocketStreamEvent::EVENT_ERROR, events[6].event_type);
- EXPECT_EQ(ERR_CONNECTION_CLOSED, events[6].error_code);
- EXPECT_EQ(SocketStreamEvent::EVENT_CLOSE, events[7].event_type);
+ EXPECT_EQ(SocketStreamEvent::EVENT_CLOSE, events[6].event_type);
}
TEST_F(SocketStreamTest, SwitchToSpdy) {
« no previous file with comments | « net/socket_stream/socket_stream.cc ('k') | webkit/glue/websocketstreamhandle_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698