Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(546)

Unified Diff: chrome/browser/prefs/proxy_policy_unittest.cc

Issue 1296663003: Componentize proxy code from chrome/browser/net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/prefs/proxy_policy_unittest.cc
diff --git a/chrome/browser/prefs/proxy_policy_unittest.cc b/chrome/browser/prefs/proxy_policy_unittest.cc
index 3daee075bfd27150a4cbd883e044d06591e2505d..d4381dcc3a11754b4a5ffc6eec4b72abb3bca0d4 100644
--- a/chrome/browser/prefs/proxy_policy_unittest.cc
+++ b/chrome/browser/prefs/proxy_policy_unittest.cc
@@ -138,7 +138,7 @@ TEST_F(ProxyPolicyTest, OverridesCommandLineOptions) {
// First verify that command-line options are set correctly when
// there is no policy in effect.
scoped_ptr<PrefService> prefs(CreatePrefService(false));
- ProxyConfigDictionary dict(prefs->GetDictionary(prefs::kProxy));
+ ProxyConfigDictionary dict(prefs->GetDictionary(ProxyPrefs::kProxy));
assertProxyMode(dict, ProxyPrefs::MODE_FIXED_SERVERS);
assertProxyServer(dict, "789");
assertPacUrl(dict, std::string());
@@ -148,7 +148,7 @@ TEST_F(ProxyPolicyTest, OverridesCommandLineOptions) {
// manual proxy policy should have removed all traces of the command
// line and replaced them with the policy versions.
prefs = CreatePrefService(true);
- ProxyConfigDictionary dict2(prefs->GetDictionary(prefs::kProxy));
+ ProxyConfigDictionary dict2(prefs->GetDictionary(ProxyPrefs::kProxy));
assertProxyMode(dict2, ProxyPrefs::MODE_FIXED_SERVERS);
assertProxyServer(dict2, "ghi");
assertPacUrl(dict2, std::string());
@@ -168,7 +168,7 @@ TEST_F(ProxyPolicyTest, OverridesUnrelatedCommandLineOptions) {
// First verify that command-line options are set correctly when
// there is no policy in effect.
scoped_ptr<PrefService> prefs = CreatePrefService(false);
- ProxyConfigDictionary dict(prefs->GetDictionary(prefs::kProxy));
+ ProxyConfigDictionary dict(prefs->GetDictionary(ProxyPrefs::kProxy));
assertProxyMode(dict, ProxyPrefs::MODE_FIXED_SERVERS);
assertProxyServer(dict, "789");
assertPacUrl(dict, std::string());
@@ -179,7 +179,7 @@ TEST_F(ProxyPolicyTest, OverridesUnrelatedCommandLineOptions) {
// line proxy settings, even though they were not the specific one
// set in policy.
prefs = CreatePrefService(true);
- ProxyConfigDictionary dict2(prefs->GetDictionary(prefs::kProxy));
+ ProxyConfigDictionary dict2(prefs->GetDictionary(ProxyPrefs::kProxy));
assertProxyModeWithoutParams(dict2, ProxyPrefs::MODE_AUTO_DETECT);
}
@@ -195,14 +195,14 @@ TEST_F(ProxyPolicyTest, OverridesCommandLineNoProxy) {
// First verify that command-line options are set correctly when
// there is no policy in effect.
scoped_ptr<PrefService> prefs = CreatePrefService(false);
- ProxyConfigDictionary dict(prefs->GetDictionary(prefs::kProxy));
+ ProxyConfigDictionary dict(prefs->GetDictionary(ProxyPrefs::kProxy));
assertProxyModeWithoutParams(dict, ProxyPrefs::MODE_DIRECT);
// Try a second time time with the managed PrefStore in place, the
// auto-detect should be overridden. The default pref store must be
// in place with the appropriate default value for this to work.
prefs = CreatePrefService(true);
- ProxyConfigDictionary dict2(prefs->GetDictionary(prefs::kProxy));
+ ProxyConfigDictionary dict2(prefs->GetDictionary(ProxyPrefs::kProxy));
assertProxyModeWithoutParams(dict2, ProxyPrefs::MODE_AUTO_DETECT);
}
@@ -218,14 +218,14 @@ TEST_F(ProxyPolicyTest, OverridesCommandLineAutoDetect) {
// First verify that the auto-detect is set if there is no managed
// PrefStore.
scoped_ptr<PrefService> prefs = CreatePrefService(false);
- ProxyConfigDictionary dict(prefs->GetDictionary(prefs::kProxy));
+ ProxyConfigDictionary dict(prefs->GetDictionary(ProxyPrefs::kProxy));
assertProxyModeWithoutParams(dict, ProxyPrefs::MODE_AUTO_DETECT);
// Try a second time time with the managed PrefStore in place, the
// auto-detect should be overridden. The default pref store must be
// in place with the appropriate default value for this to work.
prefs = CreatePrefService(true);
- ProxyConfigDictionary dict2(prefs->GetDictionary(prefs::kProxy));
+ ProxyConfigDictionary dict2(prefs->GetDictionary(ProxyPrefs::kProxy));
assertProxyModeWithoutParams(dict2, ProxyPrefs::MODE_DIRECT);
}

Powered by Google App Engine
This is Rietveld 408576698