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

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

Issue 1304843004: Add source column to chrome://policy showing the origins of policies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed another test. Created 5 years, 3 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 09b6d83c477878ef685603a362cb366f0b2c3ace..650564644741c450adb389f4f511e42ba7c8e7c3 100644
--- a/chrome/browser/prefs/proxy_policy_unittest.cc
+++ b/chrome/browser/prefs/proxy_policy_unittest.cc
@@ -15,6 +15,7 @@
#include "components/policy/core/common/mock_configuration_policy_provider.h"
#include "components/policy/core/common/policy_map.h"
#include "components/policy/core/common/policy_service_impl.h"
+#include "components/policy/core/common/policy_types.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/proxy_config/proxy_config_dictionary.h"
#include "components/proxy_config/proxy_config_pref_names.h"
@@ -126,15 +127,17 @@ TEST_F(ProxyPolicyTest, OverridesCommandLineOptions) {
new base::StringValue(ProxyPrefs::kFixedServersProxyModeName);
PolicyMap policy;
policy.Set(key::kProxyMode, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- mode_name, NULL);
+ POLICY_SOURCE_CLOUD, mode_name, nullptr);
policy.Set(key::kProxyBypassList,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
+ POLICY_SOURCE_CLOUD,
new base::StringValue("abc"),
NULL);
policy.Set(key::kProxyServer,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
+ POLICY_SOURCE_CLOUD,
new base::StringValue("ghi"),
NULL);
provider_.UpdateChromePolicy(policy);
@@ -167,7 +170,7 @@ TEST_F(ProxyPolicyTest, OverridesUnrelatedCommandLineOptions) {
new base::StringValue(ProxyPrefs::kAutoDetectProxyModeName);
PolicyMap policy;
policy.Set(key::kProxyMode, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- mode_name, NULL);
+ POLICY_SOURCE_CLOUD, mode_name, nullptr);
provider_.UpdateChromePolicy(policy);
// First verify that command-line options are set correctly when
@@ -195,7 +198,7 @@ TEST_F(ProxyPolicyTest, OverridesCommandLineNoProxy) {
new base::StringValue(ProxyPrefs::kAutoDetectProxyModeName);
PolicyMap policy;
policy.Set(key::kProxyMode, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- mode_name, NULL);
+ POLICY_SOURCE_CLOUD, mode_name, nullptr);
provider_.UpdateChromePolicy(policy);
// First verify that command-line options are set correctly when
@@ -219,7 +222,7 @@ TEST_F(ProxyPolicyTest, OverridesCommandLineAutoDetect) {
new base::StringValue(ProxyPrefs::kDirectProxyModeName);
PolicyMap policy;
policy.Set(key::kProxyMode, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- mode_name, NULL);
+ POLICY_SOURCE_CLOUD, mode_name, nullptr);
provider_.UpdateChromePolicy(policy);
// First verify that the auto-detect is set if there is no managed

Powered by Google App Engine
This is Rietveld 408576698