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

Unified Diff: net/http/http_proxy_client_socket_pool_unittest.cc

Issue 8898036: base::Bind: Convert proxy_resolving_client_socket.[cc,h] and deps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Possible test fix. Created 9 years 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/http/http_proxy_client_socket_pool.cc ('k') | net/http/http_stream_factory_impl_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_proxy_client_socket_pool_unittest.cc
diff --git a/net/http/http_proxy_client_socket_pool_unittest.cc b/net/http/http_proxy_client_socket_pool_unittest.cc
index d9c51a6cbf24c2e7e09619529a8cb8529bbd6eed..4c589e9eed4f6a1fb77a14726c6f72d14d47b471 100644
--- a/net/http/http_proxy_client_socket_pool_unittest.cc
+++ b/net/http/http_proxy_client_socket_pool_unittest.cc
@@ -216,7 +216,7 @@ class HttpProxyClientSocketPoolTest : public TestWithHttpParam {
scoped_refptr<DeterministicSocketData> data_;
HttpProxyClientSocketPool pool_;
ClientSocketHandle handle_;
- TestOldCompletionCallback callback_;
+ TestCompletionCallback callback_;
};
//-----------------------------------------------------------------------------
@@ -229,8 +229,8 @@ INSTANTIATE_TEST_CASE_P(HttpProxyClientSocketPoolTests,
TEST_P(HttpProxyClientSocketPoolTest, NoTunnel) {
Initialize(false, NULL, 0, NULL, 0, NULL, 0, NULL, 0);
- int rv = handle_.Init("a", GetNoTunnelParams(), LOW, NULL, &pool_,
- BoundNetLog());
+ int rv = handle_.Init("a", GetNoTunnelParams(), LOW, CompletionCallback(),
+ &pool_, BoundNetLog());
EXPECT_EQ(OK, rv);
EXPECT_TRUE(handle_.is_initialized());
ASSERT_TRUE(handle_.socket());
@@ -271,8 +271,8 @@ TEST_P(HttpProxyClientSocketPoolTest, NeedAuth) {
arraysize(spdy_writes));
data_->StopAfter(4);
- int rv = handle_.Init("a", GetTunnelParams(), LOW, &callback_, &pool_,
- BoundNetLog());
+ int rv = handle_.Init("a", GetTunnelParams(), LOW, callback_.callback(),
+ &pool_, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
EXPECT_FALSE(handle_.is_initialized());
EXPECT_FALSE(handle_.socket());
@@ -296,7 +296,7 @@ TEST_P(HttpProxyClientSocketPoolTest, NeedAuth) {
}
TEST_P(HttpProxyClientSocketPoolTest, HaveAuth) {
- // It's pretty much impossible to make the SPDY case becave synchronously
+ // It's pretty much impossible to make the SPDY case behave synchronously
// so we skip this test for SPDY
if (GetParam() == SPDY)
return;
@@ -315,8 +315,8 @@ TEST_P(HttpProxyClientSocketPoolTest, HaveAuth) {
NULL, 0);
AddAuthToCache();
- int rv = handle_.Init("a", GetTunnelParams(), LOW, &callback_, &pool_,
- BoundNetLog());
+ int rv = handle_.Init("a", GetTunnelParams(), LOW, callback_.callback(),
+ &pool_, BoundNetLog());
EXPECT_EQ(OK, rv);
EXPECT_TRUE(handle_.is_initialized());
ASSERT_TRUE(handle_.socket());
@@ -352,8 +352,8 @@ TEST_P(HttpProxyClientSocketPoolTest, AsyncHaveAuth) {
arraysize(spdy_writes));
AddAuthToCache();
- int rv = handle_.Init("a", GetTunnelParams(), LOW, &callback_, &pool_,
- BoundNetLog());
+ int rv = handle_.Init("a", GetTunnelParams(), LOW, callback_.callback(),
+ &pool_, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
EXPECT_FALSE(handle_.is_initialized());
EXPECT_FALSE(handle_.socket());
@@ -374,8 +374,8 @@ TEST_P(HttpProxyClientSocketPoolTest, TCPError) {
socket_factory().AddSocketDataProvider(data_.get());
- int rv = handle_.Init("a", GetTunnelParams(), LOW, &callback_, &pool_,
- BoundNetLog());
+ int rv = handle_.Init("a", GetTunnelParams(), LOW, callback_.callback(),
+ &pool_, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
EXPECT_FALSE(handle_.is_initialized());
EXPECT_FALSE(handle_.socket());
@@ -399,8 +399,8 @@ TEST_P(HttpProxyClientSocketPoolTest, SSLError) {
}
socket_factory().AddSSLSocketDataProvider(ssl_data_.get());
- int rv = handle_.Init("a", GetTunnelParams(), LOW, &callback_, &pool_,
- BoundNetLog());
+ int rv = handle_.Init("a", GetTunnelParams(), LOW, callback_.callback(),
+ &pool_, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
EXPECT_FALSE(handle_.is_initialized());
EXPECT_FALSE(handle_.socket());
@@ -424,8 +424,8 @@ TEST_P(HttpProxyClientSocketPoolTest, SslClientAuth) {
}
socket_factory().AddSSLSocketDataProvider(ssl_data_.get());
- int rv = handle_.Init("a", GetTunnelParams(), LOW, &callback_, &pool_,
- BoundNetLog());
+ int rv = handle_.Init("a", GetTunnelParams(), LOW, callback_.callback(),
+ &pool_, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
EXPECT_FALSE(handle_.is_initialized());
EXPECT_FALSE(handle_.socket());
@@ -462,8 +462,8 @@ TEST_P(HttpProxyClientSocketPoolTest, TunnelUnexpectedClose) {
arraysize(spdy_writes));
AddAuthToCache();
- int rv = handle_.Init("a", GetTunnelParams(), LOW, &callback_, &pool_,
- BoundNetLog());
+ int rv = handle_.Init("a", GetTunnelParams(), LOW, callback_.callback(),
+ &pool_, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
EXPECT_FALSE(handle_.is_initialized());
EXPECT_FALSE(handle_.socket());
@@ -503,8 +503,8 @@ TEST_P(HttpProxyClientSocketPoolTest, TunnelSetupError) {
arraysize(spdy_writes));
AddAuthToCache();
- int rv = handle_.Init("a", GetTunnelParams(), LOW, &callback_, &pool_,
- BoundNetLog());
+ int rv = handle_.Init("a", GetTunnelParams(), LOW, callback_.callback(),
+ &pool_, BoundNetLog());
EXPECT_EQ(ERR_IO_PENDING, rv);
EXPECT_FALSE(handle_.is_initialized());
EXPECT_FALSE(handle_.socket());
« no previous file with comments | « net/http/http_proxy_client_socket_pool.cc ('k') | net/http/http_stream_factory_impl_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698