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

Unified Diff: net/websockets/websocket_job_unittest.cc

Issue 9425016: Change MockRead and MockWrite (et. al.) to take an IoMode enum, instead (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 8 years, 10 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/spdy/spdy_websocket_stream_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_job_unittest.cc
===================================================================
--- net/websockets/websocket_job_unittest.cc (revision 123143)
+++ net/websockets/websocket_job_unittest.cc (working copy)
@@ -807,25 +807,25 @@
// situation. If |throttling| was |THROTTLING_ON|, throttling limits the
// latter connection.
MockWrite writes[] = {
- MockWrite(true,
+ MockWrite(ASYNC,
kHandshakeRequestWithoutCookie,
kHandshakeRequestWithoutCookieLength,
1),
- MockWrite(true,
+ MockWrite(ASYNC,
kDataHello,
kDataHelloLength,
3)
};
MockRead reads[] = {
- MockRead(true,
+ MockRead(ASYNC,
kHandshakeResponseWithoutCookie,
kHandshakeResponseWithoutCookieLength,
2),
- MockRead(true,
+ MockRead(ASYNC,
kDataWorld,
kDataWorldLength,
4),
- MockRead(false, 0, 5) // EOF
+ MockRead(SYNCHRONOUS, 0, 5) // EOF
};
data_.reset(new OrderedSocketData(
reads, arraysize(reads), writes, arraysize(writes)));
@@ -880,25 +880,25 @@
// If you enabled spdy, you should specify |spdy| as |SPDY_ON|. Expected
// results depend on its configuration.
MockWrite writes_websocket[] = {
- MockWrite(true,
+ MockWrite(ASYNC,
kHandshakeRequestWithoutCookie,
kHandshakeRequestWithoutCookieLength,
1),
- MockWrite(true,
+ MockWrite(ASYNC,
kDataHello,
kDataHelloLength,
3)
};
MockRead reads_websocket[] = {
- MockRead(true,
+ MockRead(ASYNC,
kHandshakeResponseWithoutCookie,
kHandshakeResponseWithoutCookieLength,
2),
- MockRead(true,
+ MockRead(ASYNC,
kDataWorld,
kDataWorldLength,
4),
- MockRead(false, 0, 5) // EOF
+ MockRead(SYNCHRONOUS, 0, 5) // EOF
};
const spdy::SpdyStreamId kStreamId = 1;
@@ -933,7 +933,7 @@
MockRead reads_spdy[] = {
CreateMockRead(*response_frame.get(), 2),
CreateMockRead(*data_world_frame.get(), 4),
- MockRead(false, 0, 5) // EOF
+ MockRead(SYNCHRONOUS, 0, 5) // EOF
};
if (spdy == SPDY_ON)
« no previous file with comments | « net/spdy/spdy_websocket_stream_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698