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

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

Issue 397793002: Eliminate CreateBooleanValue from test files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad merge Created 6 years, 5 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: 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 a8bfb6314d2d3178eb69ca7c331a11aa1e7192ef..ba9f35c0281c54f5c4f4f07c690e91181dcdd051 100644
--- a/components/policy/core/common/schema_map_unittest.cc
+++ b/components/policy/core/common/schema_map_unittest.cc
@@ -163,8 +163,11 @@ TEST_F(SchemaMapTest, FilterBundle) {
list.AppendString("b");
map.Set("list", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
list.DeepCopy(), NULL);
- map.Set("boolean", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- base::Value::CreateBooleanValue(true), NULL);
+ map.Set("boolean",
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::FundamentalValue(true),
+ NULL);
map.Set("integer",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
@@ -195,21 +198,36 @@ TEST_F(SchemaMapTest, FilterBundle) {
// Mismatched types are also removed.
bundle.Clear();
PolicyMap& badmap = bundle.Get(extension_ns);
- badmap.Set("list", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- base::Value::CreateBooleanValue(false), NULL);
+ badmap.Set("list",
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::FundamentalValue(false),
+ NULL);
badmap.Set("boolean",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
new base::FundamentalValue(0),
NULL);
- badmap.Set("integer", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- base::Value::CreateBooleanValue(false), NULL);
- badmap.Set("null", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- base::Value::CreateBooleanValue(false), NULL);
- badmap.Set("double", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- base::Value::CreateBooleanValue(false), NULL);
- badmap.Set("object", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- base::Value::CreateBooleanValue(false), NULL);
+ badmap.Set("integer",
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::FundamentalValue(false),
+ NULL);
+ badmap.Set("null",
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::FundamentalValue(false),
+ NULL);
+ badmap.Set("double",
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::FundamentalValue(false),
+ NULL);
+ badmap.Set("object",
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::FundamentalValue(false),
+ NULL);
badmap.Set("string", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
NULL,
new ExternalDataFetcher(base::WeakPtr<ExternalDataManager>(),

Powered by Google App Engine
This is Rietveld 408576698