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

Unified Diff: net/http/http_proxy_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/http/http_proxy_client_socket_pool_unittest.cc
===================================================================
--- net/http/http_proxy_client_socket_pool_unittest.cc (revision 122403)
+++ net/http/http_proxy_client_socket_pool_unittest.cc (working copy)
@@ -146,7 +146,7 @@
return socket_factory_;
}
- void Initialize(bool async, MockRead* reads, size_t reads_count,
+ void Initialize(MockRead* reads, size_t reads_count,
MockWrite* writes, size_t writes_count,
MockRead* spdy_reads, size_t spdy_reads_count,
MockWrite* spdy_writes, size_t spdy_writes_count) {
@@ -157,13 +157,13 @@
data_ = new DeterministicSocketData(reads, reads_count, writes,
writes_count);
- data_->set_connect_data(MockConnect(async, 0));
+ data_->set_connect_data(MockConnect(SYNCHRONOUS, OK));
data_->StopAfter(2); // Request / Response
socket_factory_.AddSocketDataProvider(data_.get());
if (GetParam() != HTTP) {
- ssl_data_.reset(new SSLSocketDataProvider(async, OK));
+ ssl_data_.reset(new SSLSocketDataProvider(false, OK));
jar (doing other things) 2012/02/17 17:19:16 There is a chance that this strategy should be pus
Ryan Hamilton 2012/02/17 17:33:56 Yes, totally agree. I want to push this change in
if (GetParam() == SPDY) {
InitializeSpdySsl();
}
@@ -227,7 +227,7 @@
::testing::Values(HTTP, HTTPS, SPDY));
TEST_P(HttpProxyClientSocketPoolTest, NoTunnel) {
- Initialize(false, NULL, 0, NULL, 0, NULL, 0, NULL, 0);
+ Initialize(NULL, 0, NULL, 0, NULL, 0, NULL, 0);
int rv = handle_.Init("a", GetNoTunnelParams(), LOW, CompletionCallback(),
&pool_, BoundNetLog());
@@ -266,7 +266,7 @@
MockRead(true, 0, 3)
};
- Initialize(false, reads, arraysize(reads), writes, arraysize(writes),
+ Initialize(reads, arraysize(reads), writes, arraysize(writes),
spdy_reads, arraysize(spdy_reads), spdy_writes,
arraysize(spdy_writes));
@@ -311,7 +311,7 @@
MockRead(false, 1, "HTTP/1.1 200 Connection Established\r\n\r\n"),
};
- Initialize(false, reads, arraysize(reads), writes, arraysize(writes), NULL, 0,
+ Initialize(reads, arraysize(reads), writes, arraysize(writes), NULL, 0,
NULL, 0);
AddAuthToCache();
@@ -347,7 +347,7 @@
MockRead(true, 0, 2)
};
- Initialize(false, reads, arraysize(reads), writes, arraysize(writes),
+ Initialize(reads, arraysize(reads), writes, arraysize(writes),
spdy_reads, arraysize(spdy_reads), spdy_writes,
arraysize(spdy_writes));
AddAuthToCache();
@@ -370,7 +370,7 @@
TEST_P(HttpProxyClientSocketPoolTest, TCPError) {
if (GetParam() == SPDY) return;
data_ = new DeterministicSocketData(NULL, 0, NULL, 0);
- data_->set_connect_data(MockConnect(true, ERR_CONNECTION_CLOSED));
+ data_->set_connect_data(MockConnect(ASYNC, ERR_CONNECTION_CLOSED));
socket_factory().AddSocketDataProvider(data_.get());
@@ -389,7 +389,7 @@
TEST_P(HttpProxyClientSocketPoolTest, SSLError) {
if (GetParam() == HTTP) return;
data_ = new DeterministicSocketData(NULL, 0, NULL, 0);
- data_->set_connect_data(MockConnect(true, OK));
+ data_->set_connect_data(MockConnect(ASYNC, OK));
socket_factory().AddSocketDataProvider(data_.get());
ssl_data_.reset(new SSLSocketDataProvider(true,
@@ -414,7 +414,7 @@
TEST_P(HttpProxyClientSocketPoolTest, SslClientAuth) {
if (GetParam() == HTTP) return;
data_ = new DeterministicSocketData(NULL, 0, NULL, 0);
- data_->set_connect_data(MockConnect(true, OK));
+ data_->set_connect_data(MockConnect(ASYNC, OK));
socket_factory().AddSocketDataProvider(data_.get());
ssl_data_.reset(new SSLSocketDataProvider(true,
@@ -457,7 +457,7 @@
MockRead(true, ERR_CONNECTION_CLOSED, 1),
};
- Initialize(false, reads, arraysize(reads), writes, arraysize(writes),
+ Initialize(reads, arraysize(reads), writes, arraysize(writes),
spdy_reads, arraysize(spdy_reads), spdy_writes,
arraysize(spdy_writes));
AddAuthToCache();
@@ -498,7 +498,7 @@
MockRead(true, 0, 3),
};
- Initialize(false, reads, arraysize(reads), writes, arraysize(writes),
+ Initialize(reads, arraysize(reads), writes, arraysize(writes),
spdy_reads, arraysize(spdy_reads), spdy_writes,
arraysize(spdy_writes));
AddAuthToCache();

Powered by Google App Engine
This is Rietveld 408576698