Index: components/policy/core/common/schema_map_unittest.cc |
diff --git a/components/policy/core/common/schema_map_unittest.cc b/components/policy/core/common/schema_map_unittest.cc |
index ba9f35c0281c54f5c4f4f07c690e91181dcdd051..77d332be6efe88f2fff06ec1cd3124767f08e54b 100644 |
--- a/components/policy/core/common/schema_map_unittest.cc |
+++ b/components/policy/core/common/schema_map_unittest.cc |
@@ -141,18 +141,17 @@ TEST_F(SchemaMapTest, FilterBundle) { |
expected_bundle.Get(chrome_ns).Set("ChromePolicy", |
POLICY_LEVEL_MANDATORY, |
POLICY_SCOPE_USER, |
- base::Value::CreateStringValue("value"), |
+ new base::StringValue("value"), |
NULL); |
bundle.CopyFrom(expected_bundle); |
// Unknown components are filtered out. |
PolicyNamespace another_extension_ns(POLICY_DOMAIN_EXTENSIONS, "xyz"); |
- bundle.Get(another_extension_ns).Set( |
- "AnotherExtensionPolicy", |
- POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, |
- base::Value::CreateStringValue("value"), |
- NULL); |
+ bundle.Get(another_extension_ns).Set("AnotherExtensionPolicy", |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::StringValue("value"), |
+ NULL); |
schema_map->FilterBundle(&bundle); |
EXPECT_TRUE(bundle.Equals(expected_bundle)); |
@@ -182,14 +181,17 @@ TEST_F(SchemaMapTest, FilterBundle) { |
dict.SetInteger("b", 2); |
map.Set("object", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, |
dict.DeepCopy(), NULL); |
- map.Set("string", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, |
- base::Value::CreateStringValue("value"), NULL); |
+ map.Set("string", |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::StringValue("value"), |
+ NULL); |
bundle.MergeFrom(expected_bundle); |
bundle.Get(extension_ns).Set("Unexpected", |
POLICY_LEVEL_MANDATORY, |
POLICY_SCOPE_USER, |
- base::Value::CreateStringValue("to-be-removed"), |
+ new base::StringValue("to-be-removed"), |
NULL); |
schema_map->FilterBundle(&bundle); |
@@ -261,7 +263,7 @@ TEST_F(SchemaMapTest, LegacyComponents) { |
bundle.Get(extension_ns).Set("String", |
POLICY_LEVEL_MANDATORY, |
POLICY_SCOPE_USER, |
- base::Value::CreateStringValue("value 1"), |
+ new base::StringValue("value 1"), |
NULL); |
// The Chrome namespace isn't filtered. |
@@ -269,7 +271,7 @@ TEST_F(SchemaMapTest, LegacyComponents) { |
bundle.Get(chrome_ns).Set("ChromePolicy", |
POLICY_LEVEL_MANDATORY, |
POLICY_SCOPE_USER, |
- base::Value::CreateStringValue("value 3"), |
+ new base::StringValue("value 3"), |
NULL); |
PolicyBundle expected_bundle; |
@@ -280,14 +282,14 @@ TEST_F(SchemaMapTest, LegacyComponents) { |
bundle.Get(without_schema_ns).Set("Schemaless", |
POLICY_LEVEL_MANDATORY, |
POLICY_SCOPE_USER, |
- base::Value::CreateStringValue("value 2"), |
+ new base::StringValue("value 2"), |
NULL); |
// Unknown policies of known components with a schema are removed. |
bundle.Get(extension_ns).Set("Surprise", |
POLICY_LEVEL_MANDATORY, |
POLICY_SCOPE_USER, |
- base::Value::CreateStringValue("value 4"), |
+ new base::StringValue("value 4"), |
NULL); |
// Unknown components are removed. |
@@ -295,7 +297,7 @@ TEST_F(SchemaMapTest, LegacyComponents) { |
bundle.Get(unknown_ns).Set("Surprise", |
POLICY_LEVEL_MANDATORY, |
POLICY_SCOPE_USER, |
- base::Value::CreateStringValue("value 5"), |
+ new base::StringValue("value 5"), |
NULL); |
schema_map->FilterBundle(&bundle); |