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

Unified Diff: chrome/browser/policy/cloud_policy_provider_unittest.cc

Issue 8258018: Generate Chrome policy definition list from policy_templates.json. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the unittest fix Created 9 years, 2 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/policy/cloud_policy_provider_unittest.cc
diff --git a/chrome/browser/policy/cloud_policy_provider_unittest.cc b/chrome/browser/policy/cloud_policy_provider_unittest.cc
index 11454f15a7480b1efc4ff0b1fd75fd3c4da1f601..3be811e5f5aa6e0f2bbe576620219236a4d7b790 100644
--- a/chrome/browser/policy/cloud_policy_provider_unittest.cc
+++ b/chrome/browser/policy/cloud_policy_provider_unittest.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/policy/cloud_policy_cache_base.h"
#include "chrome/browser/policy/cloud_policy_provider_impl.h"
#include "chrome/browser/policy/configuration_policy_pref_store.h"
+#include "policy/policy_constants.h"
#include "testing/gmock/include/gmock/gmock.h"
using testing::AnyNumber;
@@ -58,7 +59,7 @@ class CloudPolicyProviderTest : public testing::Test {
protected:
void CreateCloudPolicyProvider(CloudPolicyCacheBase::PolicyLevel level) {
cloud_policy_provider_.reset(new CloudPolicyProviderImpl(
- ConfigurationPolicyPrefStore::GetChromePolicyDefinitionList(), level));
+ GetChromePolicyDefinitionList(), level));
}
// Appends the caches to a provider and then provides the policies to
@@ -66,7 +67,7 @@ class CloudPolicyProviderTest : public testing::Test {
void RunCachesThroughProvider(MockCloudPolicyCache caches[], int n,
CloudPolicyCacheBase::PolicyLevel level) {
CloudPolicyProviderImpl provider(
- policy::ConfigurationPolicyPrefStore::GetChromePolicyDefinitionList(),
+ GetChromePolicyDefinitionList(),
level);
for (int i = 0; i < n; i++) {
provider.AppendCache(&caches[i]);
@@ -222,12 +223,12 @@ TEST_F(CloudPolicyProviderTest, CombineTwoPolicyMapsProxies) {
PolicyMap A, B, C;
CreateCloudPolicyProvider(CloudPolicyCacheBase::POLICY_LEVEL_RECOMMENDED);
- A.Set(policy::kPolicyProxyMode, Value::CreateIntegerValue(a_value));
+ A.Set(kPolicyProxyMode, Value::CreateIntegerValue(a_value));
- B.Set(policy::kPolicyProxyServerMode, Value::CreateIntegerValue(b_value));
- B.Set(policy::kPolicyProxyServer, Value::CreateIntegerValue(b_value));
- B.Set(policy::kPolicyProxyPacUrl, Value::CreateIntegerValue(b_value));
- B.Set(policy::kPolicyProxyBypassList, Value::CreateIntegerValue(b_value));
+ B.Set(kPolicyProxyServerMode, Value::CreateIntegerValue(b_value));
+ B.Set(kPolicyProxyServer, Value::CreateIntegerValue(b_value));
+ B.Set(kPolicyProxyPacUrl, Value::CreateIntegerValue(b_value));
+ B.Set(kPolicyProxyBypassList, Value::CreateIntegerValue(b_value));
CombineTwoPolicyMaps(A, B, &C);
« no previous file with comments | « chrome/browser/policy/cloud_policy_provider_impl.cc ('k') | chrome/browser/policy/config_dir_policy_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698