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

Unified Diff: net/socket_stream/socket_stream_unittest.cc

Issue 3076024: Fix WebSocket crash bug. (Closed)
Patch Set: fix for tyoshino's comment Created 10 years, 5 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') | no next file » | 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 9480d8837fe4a61e1aa9ee5e5130536acd48c7a2..db1ac870cf4910850676a35e0a83b751425d4c42 100644
--- a/net/socket_stream/socket_stream_unittest.cc
+++ b/net/socket_stream/socket_stream_unittest.cc
@@ -308,6 +308,10 @@ TEST_F(SocketStreamTest, BasicAuthProxy) {
MockRead("HTTP/1.1 200 Connection Established\r\n"),
MockRead("Proxy-agent: Apache/2.2.8\r\n"),
MockRead("\r\n"),
+ // SocketStream::DoClose is run asynchronously. Socket can be read after
+ // "\r\n". We have to give ERR_IO_PENDING to SocketStream then to indicate
+ // server doesn't close the connection.
+ MockRead(true, ERR_IO_PENDING)
};
StaticSocketDataProvider data2(data_reads2, arraysize(data_reads2),
data_writes2, arraysize(data_writes2));
« no previous file with comments | « net/socket_stream/socket_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698