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

Unified Diff: components/policy/core/browser/configuration_policy_handler_unittest.cc

Issue 388963002: Get rid of the rest of CreateStringValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad rebase 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/browser/configuration_policy_handler_unittest.cc
diff --git a/components/policy/core/browser/configuration_policy_handler_unittest.cc b/components/policy/core/browser/configuration_policy_handler_unittest.cc
index 36c9c2a485440f60b6eb577c34a22b972a528f25..db30b0f1c51ae301ddd95ec9e23bae71f67957ee 100644
--- a/components/policy/core/browser/configuration_policy_handler_unittest.cc
+++ b/components/policy/core/browser/configuration_policy_handler_unittest.cc
@@ -79,9 +79,11 @@ TEST(StringToIntEnumListPolicyHandlerTest, CheckPolicySettings) {
EXPECT_FALSE(errors.empty());
EXPECT_FALSE(errors.GetErrors(kTestPolicy).empty());
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY,
+ policy_map.Set(kTestPolicy,
+ POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- base::Value::CreateStringValue("no list"), NULL);
+ new base::StringValue("no list"),
+ NULL);
errors.Clear();
EXPECT_FALSE(handler.CheckPolicySettings(policy_map, &errors));
EXPECT_FALSE(errors.empty());
@@ -180,8 +182,10 @@ TEST(IntRangePolicyHandler, CheckPolicySettingsClamp) {
// Check that an entirely invalid value is rejected and yields an error
// message.
policy_map.Set(kTestPolicy,
- POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- base::Value::CreateStringValue("invalid"), NULL);
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::StringValue("invalid"),
+ NULL);
errors.Clear();
EXPECT_FALSE(handler.CheckPolicySettings(policy_map, &errors));
EXPECT_FALSE(errors.empty());
@@ -245,8 +249,11 @@ TEST(IntRangePolicyHandler, CheckPolicySettingsDontClamp) {
// Check that an entirely invalid value is rejected and yields an error
// message.
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- base::Value::CreateStringValue("invalid"), NULL);
+ policy_map.Set(kTestPolicy,
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::StringValue("invalid"),
+ NULL);
errors.Clear();
EXPECT_FALSE(handler.CheckPolicySettings(policy_map, &errors));
EXPECT_FALSE(errors.empty());
@@ -425,8 +432,11 @@ TEST(IntPercentageToDoublePolicyHandler, CheckPolicySettingsClamp) {
// Check that an entirely invalid value is rejected and yields an error
// message.
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- base::Value::CreateStringValue("invalid"), NULL);
+ policy_map.Set(kTestPolicy,
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::StringValue("invalid"),
+ NULL);
errors.Clear();
EXPECT_FALSE(handler.CheckPolicySettings(policy_map, &errors));
EXPECT_FALSE(errors.empty());
@@ -491,8 +501,11 @@ TEST(IntPercentageToDoublePolicyHandler, CheckPolicySettingsDontClamp) {
// Check that an entirely invalid value is rejected and yields an error
// message.
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- base::Value::CreateStringValue("invalid"), NULL);
+ policy_map.Set(kTestPolicy,
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::StringValue("invalid"),
+ NULL);
errors.Clear();
EXPECT_FALSE(handler.CheckPolicySettings(policy_map, &errors));
EXPECT_FALSE(errors.empty());
« no previous file with comments | « components/metrics/persisted_logs.cc ('k') | components/policy/core/browser/configuration_policy_pref_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698