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

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: tweaks 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 51a47f8de0f4765016ba67258ca27d931c135689..9ecc9c493b99a8fde756319a3d389419f09282ee 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());
@@ -165,8 +167,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());
@@ -215,8 +219,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());
@@ -356,8 +363,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());
@@ -407,8 +417,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());

Powered by Google App Engine
This is Rietveld 408576698