Index: net/proxy/proxy_resolver_perftest.cc |
=================================================================== |
--- net/proxy/proxy_resolver_perftest.cc (revision 21630) |
+++ net/proxy/proxy_resolver_perftest.cc (working copy) |
@@ -92,11 +92,11 @@ |
void RunTest(const std::string& script_name, |
const PacQuery* queries, |
int queries_len) { |
- GURL pac_url; |
- |
- if (resolver_->does_fetch()) { |
+ if (!resolver_->expects_pac_bytes()) { |
InitHttpServer(); |
- pac_url = server_->TestServerPage(std::string("files/") + script_name); |
+ GURL pac_url = |
+ server_->TestServerPage(std::string("files/") + script_name); |
+ resolver_->SetPacScriptByUrl(pac_url); |
} else { |
LoadPacScriptIntoResolver(script_name); |
} |
@@ -107,7 +107,7 @@ |
{ |
net::ProxyInfo proxy_info; |
int result = resolver_->GetProxyForURL( |
- GURL("http://www.warmup.com"), pac_url, &proxy_info); |
+ GURL("http://www.warmup.com"), &proxy_info, NULL, NULL); |
ASSERT_EQ(net::OK, result); |
} |
@@ -122,8 +122,7 @@ |
// Resolve. |
net::ProxyInfo proxy_info; |
int result = resolver_->GetProxyForURL(GURL(query.query_url), |
- pac_url, |
- &proxy_info); |
+ &proxy_info, NULL, NULL); |
// Check that the result was correct. Note that ToPacString() and |
// ASSERT_EQ() are fast, so they won't skew the results. |
@@ -137,7 +136,7 @@ |
// Lazily startup an HTTP server (to serve the PAC script). |
void InitHttpServer() { |
- DCHECK(resolver_->does_fetch()); |
+ DCHECK(!resolver_->expects_pac_bytes()); |
if (!server_) { |
server_ = HTTPTestServer::CreateServer( |
L"net/data/proxy_resolver_perftest", NULL); |
@@ -163,7 +162,7 @@ |
ASSERT_TRUE(ok); |
// Load the PAC script into the ProxyResolver. |
- resolver_->SetPacScript(file_contents); |
+ resolver_->SetPacScriptByData(file_contents); |
} |
net::ProxyResolver* resolver_; |