summaryrefslogtreecommitdiffstats
path: root/net/websockets
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-23 18:08:06 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-23 18:08:06 +0000
commit8ddf8322949afbe866c90690049625732c6c43b2 (patch)
tree36eaa083131a18b26f8cfc9e4f29de1ea513c703 /net/websockets
parent4e3d2672dde13d1398681eff67e92e38ea0c39cb (diff)
downloadchromium_src-8ddf8322949afbe866c90690049625732c6c43b2.zip
chromium_src-8ddf8322949afbe866c90690049625732c6c43b2.tar.gz
chromium_src-8ddf8322949afbe866c90690049625732c6c43b2.tar.bz2
Change MockRead and MockWrite (et. al.) to take an IoMode enum, instead
of a bool async. Review URL: http://codereview.chromium.org/9425016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123274 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/websockets')
-rw-r--r--net/websockets/websocket_job_unittest.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/net/websockets/websocket_job_unittest.cc b/net/websockets/websocket_job_unittest.cc
index 7ce33b9..77dc9fb 100644
--- a/net/websockets/websocket_job_unittest.cc
+++ b/net/websockets/websocket_job_unittest.cc
@@ -807,25 +807,25 @@ void WebSocketJobTest::TestConnectByWebSocket(ThrottlingOption throttling) {
// 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 @@ void WebSocketJobTest::TestConnectBySpdy(
// 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 @@ void WebSocketJobTest::TestConnectBySpdy(
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)