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

Unified Diff: net/spdy/spdy_session_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_proxy_client_socket_unittest.cc ('k') | net/spdy/spdy_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session_unittest.cc
===================================================================
--- net/spdy/spdy_session_unittest.cc (revision 123143)
+++ net/spdy/spdy_session_unittest.cc (working copy)
@@ -112,13 +112,13 @@
scoped_ptr<spdy::SpdyFrame> goaway(ConstructSpdyGoAway());
MockRead reads[] = {
CreateMockRead(*goaway),
- MockRead(false, 0, 0) // EOF
+ MockRead(SYNCHRONOUS, 0, 0) // EOF
};
StaticSocketDataProvider data(reads, arraysize(reads), NULL, 0);
data.set_connect_data(connect_data);
session_deps.socket_factory->AddSocketDataProvider(&data);
- SSLSocketDataProvider ssl(false, OK);
+ SSLSocketDataProvider ssl(SYNCHRONOUS, OK);
session_deps.socket_factory->AddSSLSocketDataProvider(&ssl);
scoped_refptr<HttpNetworkSession> http_session(
@@ -172,7 +172,7 @@
MockRead reads[] = {
CreateMockRead(*read_ping),
CreateMockRead(*read_ping),
- MockRead(false, 0, 0) // EOF
+ MockRead(SYNCHRONOUS, 0, 0) // EOF
};
scoped_ptr<spdy::SpdyFrame> write_ping(ConstructSpdyPing());
MockRead writes[] = {
@@ -184,7 +184,7 @@
data.set_connect_data(connect_data);
session_deps.socket_factory->AddSocketDataProvider(&data);
- SSLSocketDataProvider ssl(false, OK);
+ SSLSocketDataProvider ssl(SYNCHRONOUS, OK);
session_deps.socket_factory->AddSSLSocketDataProvider(&ssl);
scoped_refptr<HttpNetworkSession> http_session(
@@ -262,7 +262,7 @@
scoped_ptr<spdy::SpdyFrame> read_ping(ConstructSpdyPing());
MockRead reads[] = {
CreateMockRead(*read_ping),
- MockRead(false, 0, 0) // EOF
+ MockRead(SYNCHRONOUS, 0, 0) // EOF
};
scoped_ptr<spdy::SpdyFrame> write_ping(ConstructSpdyPing());
MockRead writes[] = {
@@ -273,7 +273,7 @@
data.set_connect_data(connect_data);
session_deps.socket_factory->AddSocketDataProvider(&data);
- SSLSocketDataProvider ssl(false, OK);
+ SSLSocketDataProvider ssl(SYNCHRONOUS, OK);
session_deps.socket_factory->AddSSLSocketDataProvider(&ssl);
scoped_refptr<HttpNetworkSession> http_session(
@@ -506,14 +506,14 @@
ConstructSpdySettings(new_settings));
MockRead reads[] = {
CreateMockRead(*settings_frame),
- MockRead(false, 0, 0) // EOF
+ MockRead(SYNCHRONOUS, 0, 0) // EOF
};
StaticSocketDataProvider data(reads, arraysize(reads), NULL, 0);
data.set_connect_data(connect_data);
session_deps.socket_factory->AddSocketDataProvider(&data);
- SSLSocketDataProvider ssl(false, OK);
+ SSLSocketDataProvider ssl(SYNCHRONOUS, OK);
session_deps.socket_factory->AddSSLSocketDataProvider(&ssl);
scoped_refptr<HttpNetworkSession> http_session(
@@ -586,7 +586,7 @@
session_deps.host_resolver->set_synchronous_mode(true);
MockRead reads[] = {
- MockRead(false, ERR_IO_PENDING) // Stall forever.
+ MockRead(SYNCHRONOUS, ERR_IO_PENDING) // Stall forever.
};
StaticSocketDataProvider data(reads, arraysize(reads), NULL, 0);
@@ -595,7 +595,7 @@
data.set_connect_data(connect_data);
session_deps.socket_factory->AddSocketDataProvider(&data);
- SSLSocketDataProvider ssl(false, OK);
+ SSLSocketDataProvider ssl(SYNCHRONOUS, OK);
session_deps.socket_factory->AddSSLSocketDataProvider(&ssl);
scoped_refptr<HttpNetworkSession> http_session(
@@ -672,7 +672,7 @@
session_deps.host_resolver->set_synchronous_mode(true);
MockRead reads[] = {
- MockRead(false, ERR_IO_PENDING) // Stall forever.
+ MockRead(SYNCHRONOUS, ERR_IO_PENDING) // Stall forever.
};
// Create the bogus setting that we want to verify is sent out.
@@ -698,7 +698,7 @@
data.set_connect_data(connect_data);
session_deps.socket_factory->AddSocketDataProvider(&data);
- SSLSocketDataProvider ssl(false, OK);
+ SSLSocketDataProvider ssl(SYNCHRONOUS, OK);
session_deps.socket_factory->AddSSLSocketDataProvider(&ssl);
scoped_refptr<HttpNetworkSession> http_session(
@@ -772,14 +772,14 @@
MockConnect connect_data(SYNCHRONOUS, OK);
MockRead reads[] = {
- MockRead(false, ERR_IO_PENDING) // Stall forever.
+ MockRead(SYNCHRONOUS, ERR_IO_PENDING) // Stall forever.
};
StaticSocketDataProvider data(reads, arraysize(reads), NULL, 0);
data.set_connect_data(connect_data);
session_deps.socket_factory->AddSocketDataProvider(&data);
- SSLSocketDataProvider ssl(false, OK);
+ SSLSocketDataProvider ssl(SYNCHRONOUS, OK);
session_deps.socket_factory->AddSSLSocketDataProvider(&ssl);
scoped_refptr<HttpNetworkSession> http_session(
@@ -912,13 +912,13 @@
MockConnect connect_data(SYNCHRONOUS, OK);
MockRead reads[] = {
- MockRead(false, ERR_IO_PENDING) // Stall forever.
+ MockRead(SYNCHRONOUS, ERR_IO_PENDING) // Stall forever.
};
StaticSocketDataProvider data(reads, arraysize(reads), NULL, 0);
data.set_connect_data(connect_data);
session_deps.socket_factory->AddSocketDataProvider(&data);
- SSLSocketDataProvider ssl(false, OK);
+ SSLSocketDataProvider ssl(SYNCHRONOUS, OK);
ssl.origin_bound_cert_type = CLIENT_CERT_RSA_SIGN;
ssl.protocol_negotiated = SSLClientSocket::kProtoSPDY3;
session_deps.socket_factory->AddSSLSocketDataProvider(&ssl);
@@ -980,7 +980,7 @@
MockConnect connect_data(SYNCHRONOUS, OK);
MockRead reads[] = {
- MockRead(false, ERR_IO_PENDING) // Stall forever.
+ MockRead(SYNCHRONOUS, ERR_IO_PENDING) // Stall forever.
};
spdy::SpdySettings settings;
scoped_ptr<spdy::SpdyFrame> settings_frame(
@@ -993,7 +993,7 @@
data.set_connect_data(connect_data);
session_deps.socket_factory->AddSocketDataProvider(&data);
- SSLSocketDataProvider ssl(false, OK);
+ SSLSocketDataProvider ssl(SYNCHRONOUS, OK);
ssl.origin_bound_cert_type = CLIENT_CERT_RSA_SIGN;
ssl.protocol_negotiated = SSLClientSocket::kProtoSPDY3;
session_deps.socket_factory->AddSSLSocketDataProvider(&ssl);
« no previous file with comments | « net/spdy/spdy_proxy_client_socket_unittest.cc ('k') | net/spdy/spdy_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698