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

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

Issue 9111022: Removed ConfigurationPolicyType and extended PolicyMap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 11 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_subsystem_unittest.cc
diff --git a/chrome/browser/policy/cloud_policy_subsystem_unittest.cc b/chrome/browser/policy/cloud_policy_subsystem_unittest.cc
index bcbc4c1963ef7c86d69b3e212635abaf36f63a90..254f44990a9579b323d4595155e32e5fb9243f03 100644
--- a/chrome/browser/policy/cloud_policy_subsystem_unittest.cc
+++ b/chrome/browser/policy/cloud_policy_subsystem_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -167,7 +167,7 @@ class CloudPolicySubsystemTestBase : public testing::Test {
// Test conditions.
EXPECT_EQ(CloudPolicySubsystem::SUCCESS, cloud_policy_subsystem_->state());
StringValue homepage_value(homepage_location);
- VerifyPolicy(kPolicyHomepageLocation, &homepage_value);
+ VerifyPolicy(key::kHomepageLocation, &homepage_value);
VerifyServerLoad();
}
@@ -204,10 +204,9 @@ class CloudPolicySubsystemTestBase : public testing::Test {
private:
// Verifies for a given policy that it is provided by the subsystem.
- void VerifyPolicy(enum ConfigurationPolicyType type, Value* expected) {
- const PolicyMap* policy_map = cache_->policy(
- CloudPolicyCacheBase::POLICY_LEVEL_MANDATORY);
- ASSERT_TRUE(Value::Equals(expected, policy_map->Get(type)));
+ void VerifyPolicy(const char* policy_name, Value* expected) {
+ const PolicyMap* policy_map = cache_->policy();
+ ASSERT_TRUE(Value::Equals(expected, policy_map->GetValue(policy_name)));
}
// Verifies that the last recorded run of the subsystem did not issue
« no previous file with comments | « chrome/browser/policy/cloud_policy_provider_unittest.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