Chromium Code Reviews| 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 16d91f947b4d9e4ea30825631e0a559df60bffa2..87c96c5b5128f31ae802187d9eb4366bf8911334 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 |
| @@ -884,6 +884,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(); |
|
mef
2014/10/30 21:05:36
Given that it is direct and doesn't change, does i
bengr
2014/11/03 23:26:58
Done.
|
| TestDataReductionProxyParams test_params( |
| DataReductionProxyParams::kAllowed | |
| @@ -933,13 +934,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 |
| @@ -947,39 +950,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()); |
| @@ -994,24 +998,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()); |
| } |