summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_resolver_perftest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/proxy/proxy_resolver_perftest.cc')
-rw-r--r--net/proxy/proxy_resolver_perftest.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/net/proxy/proxy_resolver_perftest.cc b/net/proxy/proxy_resolver_perftest.cc
index 7c74e72..45d1a7b 100644
--- a/net/proxy/proxy_resolver_perftest.cc
+++ b/net/proxy/proxy_resolver_perftest.cc
@@ -92,11 +92,11 @@ class PacPerfSuiteRunner {
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 @@ class PacPerfSuiteRunner {
{
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 @@ class PacPerfSuiteRunner {
// 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 @@ class PacPerfSuiteRunner {
// 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 @@ class PacPerfSuiteRunner {
ASSERT_TRUE(ok);
// Load the PAC script into the ProxyResolver.
- resolver_->SetPacScript(file_contents);
+ resolver_->SetPacScriptByData(file_contents);
}
net::ProxyResolver* resolver_;