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

Unified Diff: net/proxy/proxy_service_unittest.cc

Issue 126303: Add a "LoadLog*" parameter to transactions, hostresolver, clientsocketpool. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync again Created 11 years, 4 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/proxy/proxy_service.cc ('k') | net/socket/client_socket_handle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_service_unittest.cc
===================================================================
--- net/proxy/proxy_service_unittest.cc (revision 23124)
+++ net/proxy/proxy_service_unittest.cc (working copy)
@@ -92,7 +92,7 @@
ProxyInfo info;
TestCompletionCallback callback;
- int rv = service.ResolveProxy(url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_TRUE(resolver->pending_requests().empty());
@@ -111,7 +111,7 @@
ProxyInfo info;
TestCompletionCallback callback;
- int rv = service.ResolveProxy(url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, url, &info, &callback, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
EXPECT_EQ(GURL("http://foopy/proxy.pac"),
@@ -144,7 +144,7 @@
ProxyInfo info;
TestCompletionCallback callback;
- int rv = service.ResolveProxy(url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, url, &info, &callback, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
EXPECT_EQ(GURL("http://foopy/proxy.pac"),
@@ -171,7 +171,7 @@
ProxyInfo info;
TestCompletionCallback callback1;
- int rv = service.ResolveProxy(url, &info, &callback1, NULL);
+ int rv = service.ResolveProxy(NULL, url, &info, &callback1, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
EXPECT_EQ(GURL("http://foopy/proxy.pac"),
@@ -191,7 +191,7 @@
// Now, imagine that connecting to foopy:8080 fails.
TestCompletionCallback callback2;
- rv = service.ReconsiderProxyAfterError(url, &info, &callback2, NULL);
+ rv = service.ReconsiderProxyAfterError(NULL, url, &info, &callback2, NULL);
EXPECT_EQ(OK, rv);
EXPECT_TRUE(info.is_direct());
}
@@ -213,7 +213,7 @@
GURL url("http://www.google.com/");
ProxyInfo info;
TestCompletionCallback callback1;
- int rv = service.ResolveProxy(url, &info, &callback1, NULL);
+ int rv = service.ResolveProxy(NULL, url, &info, &callback1, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
EXPECT_EQ(GURL("http://foopy/proxy.pac"),
@@ -231,7 +231,7 @@
// The second resolve request will automatically select direct connect,
// because it has cached the configuration as being bad.
TestCompletionCallback callback2;
- rv = service.ResolveProxy(url, &info, &callback2, NULL);
+ rv = service.ResolveProxy(NULL, url, &info, &callback2, NULL);
EXPECT_EQ(OK, rv);
EXPECT_TRUE(info.is_direct());
EXPECT_TRUE(resolver->pending_requests().empty());
@@ -239,7 +239,7 @@
// But, if that fails, then we should give the proxy config another shot
// since we have never tried it with this URL before.
TestCompletionCallback callback3;
- rv = service.ReconsiderProxyAfterError(url, &info, &callback3, NULL);
+ rv = service.ReconsiderProxyAfterError(NULL, url, &info, &callback3, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
ASSERT_EQ(1u, resolver->pending_requests().size());
@@ -270,7 +270,7 @@
// Get the proxy information.
ProxyInfo info;
TestCompletionCallback callback1;
- int rv = service.ResolveProxy(url, &info, &callback1, NULL);
+ int rv = service.ResolveProxy(NULL, url, &info, &callback1, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
EXPECT_EQ(GURL("http://foopy/proxy.pac"),
@@ -292,14 +292,14 @@
// Fake an error on the proxy.
TestCompletionCallback callback2;
- rv = service.ReconsiderProxyAfterError(url, &info, &callback2, NULL);
+ rv = service.ReconsiderProxyAfterError(NULL, url, &info, &callback2, NULL);
EXPECT_EQ(OK, rv);
// The second proxy should be specified.
EXPECT_EQ("foopy2:9090", info.proxy_server().ToURI());
TestCompletionCallback callback3;
- rv = service.ResolveProxy(url, &info, &callback3, NULL);
+ rv = service.ResolveProxy(NULL, url, &info, &callback3, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
ASSERT_EQ(1u, resolver->pending_requests().size());
@@ -317,19 +317,19 @@
// We fake another error. It should now try the third one.
TestCompletionCallback callback4;
- rv = service.ReconsiderProxyAfterError(url, &info, &callback4, NULL);
+ rv = service.ReconsiderProxyAfterError(NULL, url, &info, &callback4, NULL);
EXPECT_EQ(OK, rv);
EXPECT_EQ("foopy2:9090", info.proxy_server().ToURI());
// Fake another error, the last proxy is gone, the list should now be empty.
TestCompletionCallback callback5;
- rv = service.ReconsiderProxyAfterError(url, &info, &callback5, NULL);
+ rv = service.ReconsiderProxyAfterError(NULL, url, &info, &callback5, NULL);
EXPECT_EQ(OK, rv); // We try direct.
EXPECT_TRUE(info.is_direct());
// If it fails again, we don't have anything else to try.
TestCompletionCallback callback6;
- rv = service.ReconsiderProxyAfterError(url, &info, &callback6, NULL);
+ rv = service.ReconsiderProxyAfterError(NULL, url, &info, &callback6, NULL);
EXPECT_EQ(ERR_FAILED, rv);
// TODO(nsylvain): Test that the proxy can be retried after the delay.
@@ -350,7 +350,7 @@
// Get the proxy information.
ProxyInfo info;
TestCompletionCallback callback1;
- int rv = service.ResolveProxy(url, &info, &callback1, NULL);
+ int rv = service.ResolveProxy(NULL, url, &info, &callback1, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
EXPECT_EQ(GURL("http://foopy/proxy.pac"),
@@ -375,7 +375,7 @@
config_service->config.pac_url = GURL("http://foopy-new/proxy.pac");
TestCompletionCallback callback2;
- rv = service.ReconsiderProxyAfterError(url, &info, &callback2, NULL);
+ rv = service.ReconsiderProxyAfterError(NULL, url, &info, &callback2, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
EXPECT_EQ(GURL("http://foopy-new/proxy.pac"),
@@ -395,7 +395,7 @@
// We fake another error. It should now ignore the first one.
TestCompletionCallback callback3;
- rv = service.ReconsiderProxyAfterError(url, &info, &callback3, NULL);
+ rv = service.ReconsiderProxyAfterError(NULL, url, &info, &callback3, NULL);
EXPECT_EQ(OK, rv);
EXPECT_EQ("foopy2:9090", info.proxy_server().ToURI());
@@ -405,7 +405,7 @@
// We fake another error. It should go back to the first proxy.
TestCompletionCallback callback4;
- rv = service.ReconsiderProxyAfterError(url, &info, &callback4, NULL);
+ rv = service.ReconsiderProxyAfterError(NULL, url, &info, &callback4, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
EXPECT_EQ(GURL("http://foopy-new2/proxy.pac"),
@@ -438,7 +438,7 @@
// Get the proxy information.
ProxyInfo info;
TestCompletionCallback callback1;
- int rv = service.ResolveProxy(url, &info, &callback1, NULL);
+ int rv = service.ResolveProxy(NULL, url, &info, &callback1, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
EXPECT_EQ(GURL("http://foopy/proxy.pac"),
@@ -458,7 +458,7 @@
// Fake a proxy error.
TestCompletionCallback callback2;
- rv = service.ReconsiderProxyAfterError(url, &info, &callback2, NULL);
+ rv = service.ReconsiderProxyAfterError(NULL, url, &info, &callback2, NULL);
EXPECT_EQ(OK, rv);
// The first proxy is ignored, and the second one is selected.
@@ -468,7 +468,7 @@
// Fake a PAC failure.
ProxyInfo info2;
TestCompletionCallback callback3;
- rv = service.ResolveProxy(url, &info2, &callback3, NULL);
+ rv = service.ResolveProxy(NULL, url, &info2, &callback3, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
ASSERT_EQ(1u, resolver->pending_requests().size());
@@ -487,7 +487,7 @@
// to check the config since everything works.
ProxyInfo info3;
TestCompletionCallback callback4;
- rv = service.ResolveProxy(url, &info3, &callback4, NULL);
+ rv = service.ResolveProxy(NULL, url, &info3, &callback4, NULL);
EXPECT_EQ(OK, rv);
EXPECT_TRUE(info3.is_direct());
@@ -495,7 +495,7 @@
// resolve the proxy before, and if not (like in this case), we give the
// PAC another try.
TestCompletionCallback callback5;
- rv = service.ReconsiderProxyAfterError(url, &info3, &callback5, NULL);
+ rv = service.ReconsiderProxyAfterError(NULL, url, &info3, &callback5, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
ASSERT_EQ(1u, resolver->pending_requests().size());
@@ -526,7 +526,7 @@
GURL url("http://www.google.com/");
// Get the proxy information.
TestCompletionCallback callback;
- int rv = service.ResolveProxy(url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_FALSE(info.is_direct());
}
@@ -536,7 +536,7 @@
new MockAsyncProxyResolver());
GURL test_url("http://local");
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_TRUE(info.is_direct());
}
@@ -549,7 +549,7 @@
new MockAsyncProxyResolver);
GURL test_url("http://www.webkit.org");
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_TRUE(info.is_direct());
}
@@ -563,7 +563,7 @@
new MockAsyncProxyResolver);
GURL test_url("http://74.125.19.147");
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_TRUE(info.is_direct());
}
@@ -576,7 +576,7 @@
new MockAsyncProxyResolver);
GURL test_url("http://www.msn.com");
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_FALSE(info.is_direct());
}
@@ -589,7 +589,7 @@
new MockAsyncProxyResolver);
GURL test_url("http://www.msnbc.msn.com");
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_TRUE(info.is_direct());
}
@@ -602,7 +602,7 @@
new MockAsyncProxyResolver);
GURL test_url("HTTP://WWW.MSNBC.MSN.COM");
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_TRUE(info.is_direct());
}
@@ -624,21 +624,21 @@
{
GURL test_url("http://www.example.com:99");
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_TRUE(info.is_direct());
}
{
GURL test_url("http://www.example.com:100");
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_FALSE(info.is_direct());
}
{
GURL test_url("http://www.example.com");
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_FALSE(info.is_direct());
}
@@ -651,7 +651,7 @@
new MockAsyncProxyResolver);
GURL test_url("http://www.example.com");
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_TRUE(info.is_direct());
}
@@ -663,7 +663,7 @@
new MockAsyncProxyResolver);
GURL test_url("http://www.example.com:99");
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_TRUE(info.is_direct());
}
@@ -677,14 +677,14 @@
{
GURL test_url("http://[3ffe:2a00:100:7031::1]:99/");
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_TRUE(info.is_direct());
}
{
GURL test_url("http://[3ffe:2a00:100:7031::1]/");
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_FALSE(info.is_direct());
}
@@ -701,14 +701,14 @@
{
GURL test_url("http://[3ffe:2a00:100:7031::1]:99/");
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_TRUE(info.is_direct());
}
{
GURL test_url("http://[3ffe:2a00:100:7031::1]/");
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_TRUE(info.is_direct());
}
@@ -725,7 +725,7 @@
GURL test_url("http://www.msn.com");
ProxyInfo info;
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_FALSE(info.is_direct());
EXPECT_EQ("foopy1:8080", info.proxy_server().ToURI());
@@ -736,7 +736,7 @@
GURL test_url("ftp://ftp.google.com");
ProxyInfo info;
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_TRUE(info.is_direct());
EXPECT_EQ("direct://", info.proxy_server().ToURI());
@@ -747,7 +747,7 @@
GURL test_url("https://webbranch.techcu.com");
ProxyInfo info;
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_FALSE(info.is_direct());
EXPECT_EQ("foopy2:8080", info.proxy_server().ToURI());
@@ -759,7 +759,7 @@
GURL test_url("http://www.microsoft.com");
ProxyInfo info;
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_FALSE(info.is_direct());
EXPECT_EQ("foopy1:8080", info.proxy_server().ToURI());
@@ -781,7 +781,7 @@
GURL test_url("http://www.msn.com");
ProxyInfo info;
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_FALSE(info.is_direct());
EXPECT_EQ("foopy1:8080", info.proxy_server().ToURI());
@@ -792,7 +792,7 @@
GURL test_url("ftp://ftp.google.com");
ProxyInfo info;
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_FALSE(info.is_direct());
EXPECT_EQ("socks4://foopy2:1080", info.proxy_server().ToURI());
@@ -803,7 +803,7 @@
GURL test_url("https://webbranch.techcu.com");
ProxyInfo info;
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_FALSE(info.is_direct());
EXPECT_EQ("socks4://foopy2:1080", info.proxy_server().ToURI());
@@ -814,7 +814,7 @@
GURL test_url("unknown://www.microsoft.com");
ProxyInfo info;
TestCompletionCallback callback;
- int rv = service.ResolveProxy(test_url, &info, &callback, NULL);
+ int rv = service.ResolveProxy(NULL, test_url, &info, &callback, NULL);
EXPECT_EQ(OK, rv);
EXPECT_FALSE(info.is_direct());
EXPECT_EQ("socks4://foopy2:1080", info.proxy_server().ToURI());
@@ -835,7 +835,7 @@
ProxyInfo info1;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(
- GURL("http://request1"), &info1, &callback1, NULL);
+ NULL, GURL("http://request1"), &info1, &callback1, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
// Nothing has been sent to the proxy resolver yet, since the proxy
@@ -854,7 +854,7 @@
TestCompletionCallback callback2;
ProxyService::PacRequest* request2;
rv = service.ResolveProxy(
- GURL("http://request2"), &info2, &callback2, &request2);
+ NULL, GURL("http://request2"), &info2, &callback2, &request2);
EXPECT_EQ(ERR_IO_PENDING, rv);
ASSERT_EQ(2u, resolver->pending_requests().size());
EXPECT_EQ(GURL("http://request2"), resolver->pending_requests()[1]->url());
@@ -862,7 +862,7 @@
ProxyInfo info3;
TestCompletionCallback callback3;
rv = service.ResolveProxy(
- GURL("http://request3"), &info3, &callback3, NULL);
+ NULL, GURL("http://request3"), &info3, &callback3, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
ASSERT_EQ(3u, resolver->pending_requests().size());
EXPECT_EQ(GURL("http://request3"), resolver->pending_requests()[2]->url());
@@ -912,7 +912,7 @@
ProxyInfo info1;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(
- GURL("http://request1"), &info1, &callback1, NULL);
+ NULL, GURL("http://request1"), &info1, &callback1, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
// The first request should have triggered download of PAC script.
@@ -922,13 +922,13 @@
ProxyInfo info2;
TestCompletionCallback callback2;
rv = service.ResolveProxy(
- GURL("http://request2"), &info2, &callback2, NULL);
+ NULL, GURL("http://request2"), &info2, &callback2, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
ProxyInfo info3;
TestCompletionCallback callback3;
rv = service.ResolveProxy(
- GURL("http://request3"), &info3, &callback3, NULL);
+ NULL, GURL("http://request3"), &info3, &callback3, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
// Nothing has been sent to the resolver yet.
@@ -990,7 +990,7 @@
TestCompletionCallback callback1;
ProxyService::PacRequest* request1;
int rv = service.ResolveProxy(
- GURL("http://request1"), &info1, &callback1, &request1);
+ NULL, GURL("http://request1"), &info1, &callback1, &request1);
EXPECT_EQ(ERR_IO_PENDING, rv);
// The first request should have triggered download of PAC script.
@@ -1001,13 +1001,13 @@
TestCompletionCallback callback2;
ProxyService::PacRequest* request2;
rv = service.ResolveProxy(
- GURL("http://request2"), &info2, &callback2, &request2);
+ NULL, GURL("http://request2"), &info2, &callback2, &request2);
EXPECT_EQ(ERR_IO_PENDING, rv);
ProxyInfo info3;
TestCompletionCallback callback3;
rv = service.ResolveProxy(
- GURL("http://request3"), &info3, &callback3, NULL);
+ NULL, GURL("http://request3"), &info3, &callback3, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
// Nothing has been sent to the resolver yet.
@@ -1063,14 +1063,14 @@
ProxyInfo info1;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(
- GURL("http://request1"), &info1, &callback1, NULL);
+ NULL, GURL("http://request1"), &info1, &callback1, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
ProxyInfo info2;
TestCompletionCallback callback2;
ProxyService::PacRequest* request2;
rv = service.ResolveProxy(
- GURL("http://request2"), &info2, &callback2, &request2);
+ NULL, GURL("http://request2"), &info2, &callback2, &request2);
EXPECT_EQ(ERR_IO_PENDING, rv);
// Check that nothing has been sent to the proxy resolver yet.
@@ -1133,14 +1133,14 @@
ProxyInfo info1;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(
- GURL("http://request1"), &info1, &callback1, NULL);
+ NULL, GURL("http://request1"), &info1, &callback1, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
ProxyInfo info2;
TestCompletionCallback callback2;
ProxyService::PacRequest* request2;
rv = service.ResolveProxy(
- GURL("http://request2"), &info2, &callback2, &request2);
+ NULL, GURL("http://request2"), &info2, &callback2, &request2);
EXPECT_EQ(ERR_IO_PENDING, rv);
// Check that nothing has been sent to the proxy resolver yet.
@@ -1208,14 +1208,14 @@
ProxyInfo info1;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(
- GURL("http://request1"), &info1, &callback1, NULL);
+ NULL, GURL("http://request1"), &info1, &callback1, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
ProxyInfo info2;
TestCompletionCallback callback2;
ProxyService::PacRequest* request2;
rv = service.ResolveProxy(
- GURL("http://request2"), &info2, &callback2, &request2);
+ NULL, GURL("http://request2"), &info2, &callback2, &request2);
EXPECT_EQ(ERR_IO_PENDING, rv);
// Check that nothing has been sent to the proxy resolver yet.
@@ -1265,7 +1265,7 @@
ProxyInfo info1;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(
- GURL("http://www.google.com"), &info1, &callback1, NULL);
+ NULL, GURL("http://www.google.com"), &info1, &callback1, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
// Check that nothing has been sent to the proxy resolver yet.
@@ -1296,7 +1296,7 @@
ProxyInfo info2;
TestCompletionCallback callback2;
rv = service.ResolveProxy(
- GURL("http://www.google.com"), &info2, &callback2, NULL);
+ NULL, GURL("http://www.google.com"), &info2, &callback2, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
ASSERT_EQ(1u, resolver->pending_requests().size());
@@ -1321,7 +1321,7 @@
ProxyInfo info;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(
- GURL("http://request1"), &info, &callback1, NULL);
+ NULL, GURL("http://request1"), &info, &callback1, NULL);
EXPECT_EQ(OK, rv);
EXPECT_EQ("foopy1:8080", info.proxy_server().ToURI());
@@ -1330,7 +1330,8 @@
config2.auto_detect = false;
service.ResetConfigService(new MockProxyConfigService(config2));
TestCompletionCallback callback2;
- rv = service.ResolveProxy(GURL("http://request2"), &info, &callback2, NULL);
+ rv = service.ResolveProxy(
+ NULL, GURL("http://request2"), &info, &callback2, NULL);
EXPECT_EQ(OK, rv);
EXPECT_EQ("foopy2:8080", info.proxy_server().ToURI());
}
@@ -1394,7 +1395,7 @@
ProxyInfo info1;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(
- GURL("http://www.google.com"), &info1, &callback1, NULL);
+ NULL, GURL("http://www.google.com"), &info1, &callback1, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
// Check that nothing has been sent to the proxy resolver yet.
@@ -1418,7 +1419,7 @@
ProxyInfo info2;
TestCompletionCallback callback2;
rv = service.ResolveProxy(
- GURL("http://www.google.com"), &info2, &callback2, NULL);
+ NULL, GURL("http://www.google.com"), &info2, &callback2, NULL);
EXPECT_EQ(OK, rv);
EXPECT_TRUE(info2.is_direct());
@@ -1439,7 +1440,7 @@
ProxyInfo info1;
TestCompletionCallback callback1;
int rv = service.ResolveProxy(
- GURL("http://www.google.com"), &info1, &callback1, NULL);
+ NULL, GURL("http://www.google.com"), &info1, &callback1, NULL);
EXPECT_EQ(ERR_IO_PENDING, rv);
// Check that nothing has been sent to the proxy resolver yet.
@@ -1471,7 +1472,7 @@
ProxyInfo info2;
TestCompletionCallback callback2;
rv = service.ResolveProxy(
- GURL("http://www.google.com"), &info2, &callback2, NULL);
+ NULL, GURL("http://www.google.com"), &info2, &callback2, NULL);
EXPECT_EQ(OK, rv);
EXPECT_TRUE(info2.is_direct());
« no previous file with comments | « net/proxy/proxy_service.cc ('k') | net/socket/client_socket_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698