Chromium Code Reviews| Index: components/data_reduction_proxy/browser/data_reduction_proxy_settings_unittest.cc |
| diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_settings_unittest.cc b/components/data_reduction_proxy/browser/data_reduction_proxy_settings_unittest.cc |
| index 28548827409f0d54e7503500d8d601accf29ebea..b3507824a1ca41b62a3eb9bf01a3a9f2f6d75e7e 100644 |
| --- a/components/data_reduction_proxy/browser/data_reduction_proxy_settings_unittest.cc |
| +++ b/components/data_reduction_proxy/browser/data_reduction_proxy_settings_unittest.cc |
| @@ -296,8 +296,37 @@ TEST_F(DataReductionProxySettingsTest, TestOnIPAddressChanged) { |
| true, |
| true, |
| false); |
| - // IP address change triggers a probe that succeed. Proxy is unrestricted. |
| - CheckProbeOnIPChange(kProbeURLWithBadResponse, |
| + // IP address change triggers a probe that succeeds. Proxy is unrestricted. |
| + CheckProbeOnIPChange(kProbeURLWithOKResponse, |
| + kWarmupURLWithNoContentResponse, |
| + "OK", |
| + true, |
| + false, |
| + false); |
| + // Simulate a VPN connection. The proxy should be disabled. |
| + MockSettings* settings = static_cast<MockSettings*>(settings_.get()); |
| + settings->network_interfaces_.reset(new net::NetworkInterfaceList()); |
| + settings->network_interfaces_->push_back( |
| + net::NetworkInterface("tun0", |
| + "tun0", |
| + 0, |
|
marq (ping after 24h)
2014/07/11 16:31:56
Add inline comments documenting the params, eg:
"
bengr
2014/07/11 22:49:16
Done.
|
| + net::NetworkChangeNotifier::CONNECTION_WIFI, |
| + net::IPAddressNumber(), |
| + 0)); |
| + settings_->OnIPAddressChanged(); |
| + base::MessageLoop::current()->RunUntilIdle(); |
| + CheckProxyConfigs(false, false, false); |
| + |
| + // Check that the proxy is re-enabled if a non-VPN connection is later used. |
| + settings->network_interfaces_.reset(new net::NetworkInterfaceList()); |
| + settings->network_interfaces_->push_back( |
| + net::NetworkInterface("eth0", |
| + "eth0", |
| + 0, |
| + net::NetworkChangeNotifier::CONNECTION_WIFI, |
| + net::IPAddressNumber(), |
| + 0)); |
| + CheckProbeOnIPChange(kProbeURLWithOKResponse, |
| kWarmupURLWithNoContentResponse, |
| "OK", |
| true, |