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

Unified Diff: components/policy/core/common/policy_bundle_unittest.cc

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix Created 4 years, 1 month 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
« no previous file with comments | « components/policy/core/common/mac_util.cc ('k') | components/policy/core/common/policy_map_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/policy_bundle_unittest.cc
diff --git a/components/policy/core/common/policy_bundle_unittest.cc b/components/policy/core/common/policy_bundle_unittest.cc
index 4cf59f60681dfd09d00354516e21973ede482be3..44ddb82da41ce3dd32fd7c584601196ad907bbd3 100644
--- a/components/policy/core/common/policy_bundle_unittest.cc
+++ b/components/policy/core/common/policy_bundle_unittest.cc
@@ -33,13 +33,13 @@ const char kExtension3[] = "extension-3";
void AddTestPolicies(PolicyMap* policy) {
policy->Set("mandatory-user", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
POLICY_SOURCE_CLOUD,
- base::MakeUnique<base::FundamentalValue>(123), nullptr);
+ base::MakeUnique<base::Value>(123), nullptr);
policy->Set("mandatory-machine", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE,
POLICY_SOURCE_CLOUD, base::MakeUnique<base::StringValue>("omg"),
nullptr);
policy->Set("recommended-user", POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER,
POLICY_SOURCE_CLOUD,
- base::MakeUnique<base::FundamentalValue>(true), nullptr);
+ base::MakeUnique<base::Value>(true), nullptr);
std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetBoolean("false", false);
dict->SetInteger("int", 456);
@@ -60,12 +60,12 @@ void AddTestPoliciesWithParams(PolicyMap *policy,
PolicyScope scope) {
policy->Set(kPolicyClashing0, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
POLICY_SOURCE_CLOUD,
- base::MakeUnique<base::FundamentalValue>(value), nullptr);
+ base::MakeUnique<base::Value>(value), nullptr);
policy->Set(kPolicyClashing1, level, scope, POLICY_SOURCE_CLOUD,
- base::MakeUnique<base::FundamentalValue>(value), nullptr);
+ base::MakeUnique<base::Value>(value), nullptr);
policy->Set(name, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
POLICY_SOURCE_CLOUD,
- base::MakeUnique<base::FundamentalValue>(value), nullptr);
+ base::MakeUnique<base::Value>(value), nullptr);
}
// Returns true if |bundle| is empty.
@@ -193,19 +193,19 @@ TEST(PolicyBundleTest, MergeFrom) {
// - kPolicyN are merged from each bundle.
PolicyMap expected;
expected.Set(kPolicyClashing0, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD, base::MakeUnique<base::FundamentalValue>(0),
+ POLICY_SOURCE_CLOUD, base::MakeUnique<base::Value>(0),
nullptr);
expected.Set(kPolicyClashing1, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE,
- POLICY_SOURCE_CLOUD, base::MakeUnique<base::FundamentalValue>(1),
+ POLICY_SOURCE_CLOUD, base::MakeUnique<base::Value>(1),
nullptr);
expected.Set(kPolicy0, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD, base::MakeUnique<base::FundamentalValue>(0),
+ POLICY_SOURCE_CLOUD, base::MakeUnique<base::Value>(0),
nullptr);
expected.Set(kPolicy1, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD, base::MakeUnique<base::FundamentalValue>(1),
+ POLICY_SOURCE_CLOUD, base::MakeUnique<base::Value>(1),
nullptr);
expected.Set(kPolicy2, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD, base::MakeUnique<base::FundamentalValue>(2),
+ POLICY_SOURCE_CLOUD, base::MakeUnique<base::Value>(2),
nullptr);
EXPECT_TRUE(merged.Get(PolicyNamespace(POLICY_DOMAIN_CHROME,
std::string())).Equals(expected));
@@ -246,14 +246,14 @@ TEST(PolicyBundleTest, Equals) {
other.CopyFrom(bundle);
bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))
.Set(kPolicy0, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD, base::MakeUnique<base::FundamentalValue>(123),
+ POLICY_SOURCE_CLOUD, base::MakeUnique<base::Value>(123),
nullptr);
EXPECT_FALSE(bundle.Equals(other));
other.CopyFrom(bundle);
EXPECT_TRUE(bundle.Equals(other));
bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))
.Set(kPolicy0, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE,
- POLICY_SOURCE_CLOUD, base::MakeUnique<base::FundamentalValue>(123),
+ POLICY_SOURCE_CLOUD, base::MakeUnique<base::Value>(123),
nullptr);
EXPECT_FALSE(bundle.Equals(other));
@@ -265,7 +265,7 @@ TEST(PolicyBundleTest, Equals) {
EXPECT_TRUE(bundle.Equals(other));
policy_map.Set(kPolicy0, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
POLICY_SOURCE_CLOUD,
- base::MakeUnique<base::FundamentalValue>(123), nullptr);
+ base::MakeUnique<base::Value>(123), nullptr);
EXPECT_FALSE(bundle.Equals(other));
}
« no previous file with comments | « components/policy/core/common/mac_util.cc ('k') | components/policy/core/common/policy_map_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698