| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_protocol_unittest.cc
|
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_protocol_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_protocol_unittest.cc
|
| index 1ff3832653655d17ef42886509f4b3a2831e3f46..99cffff3377c6d10e1bb0cee1300ed99e1eb1887 100644
|
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_protocol_unittest.cc
|
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_protocol_unittest.cc
|
| @@ -831,6 +831,7 @@ class BadEntropyProvider : public base::FieldTrial::EntropyProvider {
|
| TEST_F(DataReductionProxyProtocolTest, OnResolveProxyHandler) {
|
| int load_flags = net::LOAD_NORMAL;
|
| GURL url("http://www.google.com/");
|
| + net::ProxyConfig proxy_config = net::ProxyConfig::CreateDirect();
|
|
|
| TestDataReductionProxyParams test_params(
|
| DataReductionProxyParams::kAllowed |
|
| @@ -880,13 +881,15 @@ TEST_F(DataReductionProxyProtocolTest, OnResolveProxyHandler) {
|
| // The data reduction proxy is used. It should be used afterwards.
|
| result.Use(data_reduction_proxy_info);
|
| OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config,
|
| - empty_proxy_retry_info, &test_params, &result);
|
| + proxy_config, empty_proxy_retry_info,
|
| + &test_params, &result);
|
| EXPECT_EQ(data_reduction_proxy_info.proxy_server(), result.proxy_server());
|
|
|
| // Another proxy is used. It should be used afterwards.
|
| result.Use(other_proxy_info);
|
| OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config,
|
| - empty_proxy_retry_info, &test_params, &result);
|
| + proxy_config, empty_proxy_retry_info,
|
| + &test_params, &result);
|
| EXPECT_EQ(other_proxy_info.proxy_server(), result.proxy_server());
|
|
|
| // A direct connection is used. The data reduction proxy should be used
|
| @@ -894,39 +897,40 @@ TEST_F(DataReductionProxyProtocolTest, OnResolveProxyHandler) {
|
| // Another proxy is used. It should be used afterwards.
|
| result.Use(direct_proxy_info);
|
| OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config,
|
| - empty_proxy_retry_info, &test_params, &result);
|
| + proxy_config, empty_proxy_retry_info,
|
| + &test_params, &result);
|
| EXPECT_EQ(data_reduction_proxy_info.proxy_server(), result.proxy_server());
|
|
|
| // A direct connection is used, but the data reduction proxy is on the retry
|
| // list. A direct connection should be used afterwards.
|
| result.Use(direct_proxy_info);
|
| OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config,
|
| - data_reduction_proxy_retry_info, &test_params,
|
| - &result);
|
| + proxy_config, data_reduction_proxy_retry_info,
|
| + &test_params, &result);
|
| EXPECT_TRUE(result.proxy_server().is_direct());
|
|
|
|
|
| // Without DataCompressionProxyCriticalBypass Finch trial set, should never
|
| // bypass.
|
| OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config,
|
| - empty_proxy_retry_info, &test_params,
|
| + proxy_config, empty_proxy_retry_info, &test_params,
|
| &data_reduction_proxy_info);
|
| EXPECT_FALSE(data_reduction_proxy_info.is_direct());
|
|
|
| OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config,
|
| - empty_proxy_retry_info, &test_params,
|
| + proxy_config, empty_proxy_retry_info, &test_params,
|
| &other_proxy_info);
|
| EXPECT_FALSE(other_proxy_info.is_direct());
|
|
|
| load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
|
|
|
| OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config,
|
| - empty_proxy_retry_info, &test_params,
|
| + proxy_config, empty_proxy_retry_info, &test_params,
|
| &data_reduction_proxy_info);
|
| EXPECT_FALSE(data_reduction_proxy_info.is_direct());
|
|
|
| OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config,
|
| - empty_proxy_retry_info, &test_params,
|
| + proxy_config, empty_proxy_retry_info, &test_params,
|
| &other_proxy_info);
|
| EXPECT_FALSE(other_proxy_info.is_direct());
|
|
|
| @@ -941,24 +945,24 @@ TEST_F(DataReductionProxyProtocolTest, OnResolveProxyHandler) {
|
| load_flags = net::LOAD_NORMAL;
|
|
|
| OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config,
|
| - empty_proxy_retry_info, &test_params,
|
| + proxy_config, empty_proxy_retry_info, &test_params,
|
| &data_reduction_proxy_info);
|
| EXPECT_FALSE(data_reduction_proxy_info.is_direct());
|
|
|
| OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config,
|
| - empty_proxy_retry_info, &test_params,
|
| + proxy_config, empty_proxy_retry_info, &test_params,
|
| &other_proxy_info);
|
| EXPECT_FALSE(other_proxy_info.is_direct());
|
|
|
| load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
|
|
|
| OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config,
|
| - empty_proxy_retry_info, &test_params,
|
| + proxy_config, empty_proxy_retry_info, &test_params,
|
| &other_proxy_info);
|
| EXPECT_FALSE(other_proxy_info.is_direct());
|
|
|
| OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config,
|
| - empty_proxy_retry_info, &test_params,
|
| + proxy_config, empty_proxy_retry_info, &test_params,
|
| &data_reduction_proxy_info);
|
| EXPECT_TRUE(data_reduction_proxy_info.is_direct());
|
| }
|
|
|