Index: chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc |
diff --git a/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc b/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc |
index 2f5505341b09644b15bd5297b1492d621a90ed0e..27a30d469086857dec52d6fca6a97745d683750c 100644 |
--- a/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc |
+++ b/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/browser/net/pref_proxy_config_tracker_impl.h" |
+#include "components/proxy_config/pref_proxy_config_tracker_impl.h" |
#include <string> |
@@ -89,7 +89,9 @@ class PrefProxyConfigTrackerImplTestBase : public TESTBASE { |
delegate_service_ = |
new TestProxyConfigService(fixed_config_, |
net::ProxyConfigService::CONFIG_VALID); |
- proxy_config_tracker_.reset(new PrefProxyConfigTrackerImpl(pref_service)); |
+ proxy_config_tracker_.reset(new PrefProxyConfigTrackerImpl( |
+ pref_service, |
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); |
proxy_config_service_ = |
proxy_config_tracker_->CreateTrackingProxyConfigService( |
scoped_ptr<net::ProxyConfigService>(delegate_service_)); |
@@ -136,7 +138,7 @@ TEST_F(PrefProxyConfigTrackerImplTest, BaseConfiguration) { |
} |
TEST_F(PrefProxyConfigTrackerImplTest, DynamicPrefOverrides) { |
- pref_service_->SetManagedPref(prefs::kProxy, |
+ pref_service_->SetManagedPref(ProxyPrefs::kProxy, |
ProxyConfigDictionary::CreateFixedServers( |
"http://example.com:3128", std::string())); |
loop_.RunUntilIdle(); |
@@ -151,7 +153,7 @@ TEST_F(PrefProxyConfigTrackerImplTest, DynamicPrefOverrides) { |
net::ProxyServer::FromURI("http://example.com:3128", |
net::ProxyServer::SCHEME_HTTP)); |
- pref_service_->SetManagedPref(prefs::kProxy, |
+ pref_service_->SetManagedPref(ProxyPrefs::kProxy, |
ProxyConfigDictionary::CreateAutoDetect()); |
loop_.RunUntilIdle(); |
@@ -189,7 +191,7 @@ TEST_F(PrefProxyConfigTrackerImplTest, Observers) { |
EXPECT_CALL(observer, OnProxyConfigChanged(ProxyConfigMatches(pref_config), |
CONFIG_VALID)).Times(1); |
pref_service_->SetManagedPref( |
- prefs::kProxy, |
+ ProxyPrefs::kProxy, |
ProxyConfigDictionary::CreatePacScript(kFixedPacUrl, false)); |
loop_.RunUntilIdle(); |
Mock::VerifyAndClearExpectations(&observer); |
@@ -206,7 +208,7 @@ TEST_F(PrefProxyConfigTrackerImplTest, Observers) { |
// Clear the override should switch back to the fixed configuration. |
EXPECT_CALL(observer, OnProxyConfigChanged(ProxyConfigMatches(config3), |
CONFIG_VALID)).Times(1); |
- pref_service_->RemoveManagedPref(prefs::kProxy); |
+ pref_service_->RemoveManagedPref(ProxyPrefs::kProxy); |
loop_.RunUntilIdle(); |
Mock::VerifyAndClearExpectations(&observer); |
@@ -240,9 +242,8 @@ TEST_F(PrefProxyConfigTrackerImplTest, Fallback) { |
EXPECT_CALL(observer, |
OnProxyConfigChanged(ProxyConfigMatches(recommended_config), |
CONFIG_VALID)).Times(1); |
- pref_service_->SetRecommendedPref( |
- prefs::kProxy, |
- ProxyConfigDictionary::CreateAutoDetect()); |
+ pref_service_->SetRecommendedPref(ProxyPrefs::kProxy, |
+ ProxyConfigDictionary::CreateAutoDetect()); |
loop_.RunUntilIdle(); |
Mock::VerifyAndClearExpectations(&observer); |
EXPECT_EQ(CONFIG_VALID, |
@@ -254,7 +255,7 @@ TEST_F(PrefProxyConfigTrackerImplTest, Fallback) { |
OnProxyConfigChanged(ProxyConfigMatches(user_config), |
CONFIG_VALID)).Times(1); |
pref_service_->SetManagedPref( |
- prefs::kProxy, |
+ ProxyPrefs::kProxy, |
ProxyConfigDictionary::CreatePacScript(kFixedPacUrl, false)); |
loop_.RunUntilIdle(); |
Mock::VerifyAndClearExpectations(&observer); |
@@ -266,7 +267,7 @@ TEST_F(PrefProxyConfigTrackerImplTest, Fallback) { |
EXPECT_CALL(observer, |
OnProxyConfigChanged(ProxyConfigMatches(recommended_config), |
CONFIG_VALID)).Times(1); |
- pref_service_->RemoveManagedPref(prefs::kProxy); |
+ pref_service_->RemoveManagedPref(ProxyPrefs::kProxy); |
loop_.RunUntilIdle(); |
Mock::VerifyAndClearExpectations(&observer); |
EXPECT_EQ(CONFIG_VALID, |
@@ -277,12 +278,10 @@ TEST_F(PrefProxyConfigTrackerImplTest, Fallback) { |
} |
TEST_F(PrefProxyConfigTrackerImplTest, ExplicitSystemSettings) { |
- pref_service_->SetRecommendedPref( |
- prefs::kProxy, |
- ProxyConfigDictionary::CreateAutoDetect()); |
- pref_service_->SetUserPref( |
- prefs::kProxy, |
- ProxyConfigDictionary::CreateSystem()); |
+ pref_service_->SetRecommendedPref(ProxyPrefs::kProxy, |
+ ProxyConfigDictionary::CreateAutoDetect()); |
+ pref_service_->SetUserPref(ProxyPrefs::kProxy, |
+ ProxyConfigDictionary::CreateSystem()); |
loop_.RunUntilIdle(); |
// Test if we actually use the system setting, which is |kFixedPacUrl|. |
@@ -363,7 +362,7 @@ TEST_F(PrefProxyConfigTrackerImplTest, ExcludeGooglezipDataReductionProxies) { |
// Test setting the proxy from a user pref. |
for (const auto& test : test_cases) { |
base::HistogramTester histogram_tester; |
- pref_service_->SetUserPref(prefs::kProxy, |
+ pref_service_->SetUserPref(ProxyPrefs::kProxy, |
ProxyConfigDictionary::CreateFixedServers( |
test.initial_proxy_rules, std::string())); |
loop_.RunUntilIdle(); |