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

Unified Diff: net/socket/ssl_client_socket_pool_unittest.cc

Issue 9419032: Modify the MockConnect constructor to take an enum of ASYNC or SYNC, instead (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix Test Break 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
Index: net/socket/ssl_client_socket_pool_unittest.cc
===================================================================
--- net/socket/ssl_client_socket_pool_unittest.cc (revision 122403)
+++ net/socket/ssl_client_socket_pool_unittest.cc (working copy)
@@ -174,7 +174,7 @@
TEST_F(SSLClientSocketPoolTest, TCPFail) {
StaticSocketDataProvider data;
- data.set_connect_data(MockConnect(false, ERR_CONNECTION_FAILED));
+ data.set_connect_data(MockConnect(SYNCHRONOUS, ERR_CONNECTION_FAILED));
socket_factory_.AddSocketDataProvider(&data);
CreatePool(true /* tcp pool */, false, false);
@@ -192,7 +192,7 @@
TEST_F(SSLClientSocketPoolTest, TCPFailAsync) {
StaticSocketDataProvider data;
- data.set_connect_data(MockConnect(true, ERR_CONNECTION_FAILED));
+ data.set_connect_data(MockConnect(ASYNC, ERR_CONNECTION_FAILED));
socket_factory_.AddSocketDataProvider(&data);
CreatePool(true /* tcp pool */, false, false);
@@ -215,7 +215,7 @@
TEST_F(SSLClientSocketPoolTest, BasicDirect) {
StaticSocketDataProvider data;
- data.set_connect_data(MockConnect(false, OK));
+ data.set_connect_data(MockConnect(SYNCHRONOUS, OK));
socket_factory_.AddSocketDataProvider(&data);
SSLSocketDataProvider ssl(false, OK);
socket_factory_.AddSSLSocketDataProvider(&ssl);
@@ -428,7 +428,7 @@
TEST_F(SSLClientSocketPoolTest, SOCKSFail) {
StaticSocketDataProvider data;
- data.set_connect_data(MockConnect(false, ERR_CONNECTION_FAILED));
+ data.set_connect_data(MockConnect(SYNCHRONOUS, ERR_CONNECTION_FAILED));
socket_factory_.AddSocketDataProvider(&data);
CreatePool(false, true /* http proxy pool */, true /* socks pool */);
@@ -447,7 +447,7 @@
TEST_F(SSLClientSocketPoolTest, SOCKSFailAsync) {
StaticSocketDataProvider data;
- data.set_connect_data(MockConnect(true, ERR_CONNECTION_FAILED));
+ data.set_connect_data(MockConnect(ASYNC, ERR_CONNECTION_FAILED));
socket_factory_.AddSocketDataProvider(&data);
CreatePool(false, true /* http proxy pool */, true /* socks pool */);
@@ -470,7 +470,7 @@
TEST_F(SSLClientSocketPoolTest, SOCKSBasic) {
StaticSocketDataProvider data;
- data.set_connect_data(MockConnect(false, OK));
+ data.set_connect_data(MockConnect(SYNCHRONOUS, OK));
socket_factory_.AddSocketDataProvider(&data);
SSLSocketDataProvider ssl(false, OK);
socket_factory_.AddSSLSocketDataProvider(&ssl);
@@ -513,7 +513,7 @@
TEST_F(SSLClientSocketPoolTest, HttpProxyFail) {
StaticSocketDataProvider data;
- data.set_connect_data(MockConnect(false, ERR_CONNECTION_FAILED));
+ data.set_connect_data(MockConnect(SYNCHRONOUS, ERR_CONNECTION_FAILED));
socket_factory_.AddSocketDataProvider(&data);
CreatePool(false, true /* http proxy pool */, true /* socks pool */);
@@ -532,7 +532,7 @@
TEST_F(SSLClientSocketPoolTest, HttpProxyFailAsync) {
StaticSocketDataProvider data;
- data.set_connect_data(MockConnect(true, ERR_CONNECTION_FAILED));
+ data.set_connect_data(MockConnect(ASYNC, ERR_CONNECTION_FAILED));
socket_factory_.AddSocketDataProvider(&data);
CreatePool(false, true /* http proxy pool */, true /* socks pool */);
@@ -566,7 +566,7 @@
};
StaticSocketDataProvider data(reads, arraysize(reads), writes,
arraysize(writes));
- data.set_connect_data(MockConnect(false, OK));
+ data.set_connect_data(MockConnect(SYNCHRONOUS, OK));
socket_factory_.AddSocketDataProvider(&data);
AddAuthToCache();
SSLSocketDataProvider ssl(false, OK);

Powered by Google App Engine
This is Rietveld 408576698