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

Unified Diff: components/search_engines/default_search_policy_handler_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/search_engines/default_search_policy_handler_unittest.cc
diff --git a/components/search_engines/default_search_policy_handler_unittest.cc b/components/search_engines/default_search_policy_handler_unittest.cc
index a79b5a6c798307cc974494b13d708f2a33925795..c3c37ced0f3b7ac3013ea14ba3de031795de5b8a 100644
--- a/components/search_engines/default_search_policy_handler_unittest.cc
+++ b/components/search_engines/default_search_policy_handler_unittest.cc
@@ -82,8 +82,11 @@ void DefaultSearchPolicyHandlerTest::
base::ListValue* encodings = new base::ListValue();
encodings->AppendString("UTF-16");
encodings->AppendString("UTF-8");
- policy->Set(key::kDefaultSearchProviderEnabled, POLICY_LEVEL_MANDATORY,
- POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true), NULL);
+ policy->Set(key::kDefaultSearchProviderEnabled,
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::FundamentalValue(true),
+ NULL);
policy->Set(key::kDefaultSearchProviderSearchURL, POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER, base::Value::CreateStringValue(kSearchURL),
NULL);
@@ -120,8 +123,11 @@ void DefaultSearchPolicyHandlerTest::
// search URL, that all the elements have been given proper defaults.
TEST_F(DefaultSearchPolicyHandlerTest, MinimallyDefined) {
PolicyMap policy;
- policy.Set(key::kDefaultSearchProviderEnabled, POLICY_LEVEL_MANDATORY,
- POLICY_SCOPE_USER, base::Value::CreateBooleanValue(true), NULL);
+ policy.Set(key::kDefaultSearchProviderEnabled,
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::FundamentalValue(true),
+ NULL);
policy.Set(key::kDefaultSearchProviderSearchURL, POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER, base::Value::CreateStringValue(kSearchURL),
NULL);
@@ -297,8 +303,11 @@ TEST_F(DefaultSearchPolicyHandlerTest, Invalid) {
// default search policy will be present.
TEST_F(DefaultSearchPolicyHandlerTest, Disabled) {
PolicyMap policy;
- policy.Set(key::kDefaultSearchProviderEnabled, POLICY_LEVEL_MANDATORY,
- POLICY_SCOPE_USER, base::Value::CreateBooleanValue(false), NULL);
+ policy.Set(key::kDefaultSearchProviderEnabled,
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::FundamentalValue(false),
+ NULL);
UpdateProviderPolicy(policy);
const base::Value* value = NULL;
@@ -380,7 +389,7 @@ TEST_F(DefaultSearchPolicyHandlerTest, DictionaryPrefDSEDisabled) {
policy.Set(key::kDefaultSearchProviderEnabled,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- base::Value::CreateBooleanValue(false),
+ new base::FundamentalValue(false),
NULL);
UpdateProviderPolicy(policy);
const base::Value* temp = NULL;
@@ -400,7 +409,7 @@ TEST_F(DefaultSearchPolicyHandlerTest, DictionaryPrefMinimallyDefined) {
policy.Set(key::kDefaultSearchProviderEnabled,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- base::Value::CreateBooleanValue(true),
+ new base::FundamentalValue(true),
NULL);
policy.Set(key::kDefaultSearchProviderSearchURL,
POLICY_LEVEL_MANDATORY,
@@ -462,7 +471,7 @@ TEST_F(DefaultSearchPolicyHandlerTest, DictionaryPrefFileURL) {
policy.Set(key::kDefaultSearchProviderEnabled,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- base::Value::CreateBooleanValue(true),
+ new base::FundamentalValue(true),
NULL);
policy.Set(key::kDefaultSearchProviderSearchURL,
POLICY_LEVEL_MANDATORY,
« no previous file with comments | « components/policy/core/common/schema_map_unittest.cc ('k') | tools/json_schema_compiler/test/any_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698