Commit e4a2d0f5 authored by Eric Roman's avatar Eric Roman Committed by Commit Bot

Update a test to explicitly allow proxying localhost.

This preserves its previous behavior (localhost now bypasses the proxy).

Bug: 901896
Change-Id: I2d651b6ff8828d3f344fed0aecf4fb4ae4c31eb8
Reviewed-on: https://chromium-review.googlesource.com/c/1354646Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Commit-Queue: Eric Roman <eroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611993}
parent c66e1686
...@@ -4288,15 +4288,16 @@ TEST_F(NetworkContextTest, EnsureProperProxyServerIsUsed) { ...@@ -4288,15 +4288,16 @@ TEST_F(NetworkContextTest, EnsureProperProxyServerIsUsed) {
} proxy_config_set[2]; } proxy_config_set[2];
proxy_config_set[0].proxy_config.proxy_rules().ParseFromString( proxy_config_set[0].proxy_config.proxy_rules().ParseFromString(
base::StringPrintf("http=%s", "http=" + test_server.host_port_pair().ToString());
test_server.host_port_pair().ToString().c_str()));
// The domain here is irrelevant, and it is the path that matters.
proxy_config_set[0].url = GURL("http://does.not.matter/echo"); proxy_config_set[0].url = GURL("http://does.not.matter/echo");
proxy_config_set[0].expected_proxy_config_scheme = proxy_config_set[0].expected_proxy_config_scheme =
net::ProxyServer::SCHEME_HTTP; net::ProxyServer::SCHEME_HTTP;
proxy_config_set[1].proxy_config.proxy_rules().ParseFromString( proxy_config_set[1].proxy_config.proxy_rules().ParseFromString(
"http=direct://"); "http=direct://");
proxy_config_set[1]
.proxy_config.proxy_rules()
.bypass_rules.AddRulesToSubtractImplicit();
proxy_config_set[1].url = test_server.GetURL("/echo"); proxy_config_set[1].url = test_server.GetURL("/echo");
proxy_config_set[1].expected_proxy_config_scheme = proxy_config_set[1].expected_proxy_config_scheme =
net::ProxyServer::SCHEME_DIRECT; net::ProxyServer::SCHEME_DIRECT;
...@@ -4319,8 +4320,7 @@ TEST_F(NetworkContextTest, EnsureProperProxyServerIsUsed) { ...@@ -4319,8 +4320,7 @@ TEST_F(NetworkContextTest, EnsureProperProxyServerIsUsed) {
std::move(params)); std::move(params));
ResourceRequest request; ResourceRequest request;
// The domain here is irrelevant, and it is the path that matters. request.url = proxy_data.url;
request.url = proxy_data.url; // test_server.GetURL("/echo");
mojom::URLLoaderPtr loader; mojom::URLLoaderPtr loader;
TestURLLoaderClient client; TestURLLoaderClient client;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment