| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client_unittest.cc
|
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client_unittest.cc
|
| index d0b03d75b1c6caa6464c921e0e08567160406453..dac3f8682be22bae6826b65604e29bd57c6dc26e 100644
|
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client_unittest.cc
|
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client_unittest.cc
|
| @@ -219,6 +219,8 @@ class DataReductionProxyConfigServiceClientTest : public testing::Test {
|
| return test_context_->test_configurator();
|
| }
|
|
|
| + TestDataReductionProxyConfig* config() { return test_context_->config(); }
|
| +
|
| MockDataReductionProxyRequestOptions* request_options() {
|
| return test_context_->mock_request_options();
|
| }
|
| @@ -335,6 +337,8 @@ TEST_F(DataReductionProxyConfigServiceClientTest, DevRolloutAndQuic) {
|
| }
|
|
|
| base::FieldTrialList field_trial_list(new base::MockEntropyProvider());
|
| + base::FieldTrialList::CreateFieldTrial(
|
| + params::GetTrustedSpdyProxyFieldTrialName(), "Enabled");
|
| if (tests[i].enable_quic) {
|
| base::FieldTrialList::CreateFieldTrial(params::GetQuicFieldTrialName(),
|
| "Enabled");
|
| @@ -372,6 +376,29 @@ TEST_F(DataReductionProxyConfigServiceClientTest, DevRolloutAndQuic) {
|
| proxies_for_http[1])
|
| << i;
|
| EXPECT_TRUE(configurator()->proxies_for_https().empty()) << i;
|
| +
|
| + // Test that the trusted SPDY proxy is updated correctly after each config
|
| + // retrieval.
|
| + net::ProxyServer trusted_spdy_proxy;
|
| + config()->GetTrustedSpdyProxy(&trusted_spdy_proxy);
|
| +
|
| + std::string expected_primary_proxy;
|
| + net::ProxyServer::Scheme expected_primary_proxy_scheme =
|
| + net::ProxyServer::SCHEME_HTTP;
|
| +
|
| + if (tests[i].expected_primary_proxy_scheme ==
|
| + net::ProxyServer::SCHEME_HTTPS) {
|
| + expected_primary_proxy = tests[i].expected_primary_proxy;
|
| + expected_primary_proxy_scheme = tests[i].expected_primary_proxy_scheme;
|
| + EXPECT_EQ(net::ProxyServer::FromURI(expected_primary_proxy,
|
| + expected_primary_proxy_scheme)
|
| + .host_port_pair()
|
| + .ToString(),
|
| + trusted_spdy_proxy.host_port_pair().ToString())
|
| + << i;
|
| + } else {
|
| + EXPECT_FALSE(trusted_spdy_proxy.is_valid());
|
| + }
|
| }
|
| }
|
|
|
|
|