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

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

Issue 390233003: Decrement CreateDoubleValue count (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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..e8b4aaeb983be81ed5fd03b291e051a1fcbf4b9c 100644
--- a/components/policy/core/browser/configuration_policy_handler_unittest.cc
+++ b/components/policy/core/browser/configuration_policy_handler_unittest.cc
@@ -430,7 +430,7 @@ TEST(IntPercentageToDoublePolicyHandler, ApplyPolicySettingsClamp) {
POLICY_SCOPE_USER, base::Value::CreateIntegerValue(0), NULL);
prefs.Clear();
handler.ApplyPolicySettings(policy_map, &prefs);
- expected.reset(base::Value::CreateDoubleValue(0.0));
+ expected.reset(new base::FundamentalValue(0.0));
EXPECT_TRUE(prefs.GetValue(kTestPref, &value));
EXPECT_TRUE(base::Value::Equals(expected.get(), value));
@@ -438,7 +438,7 @@ TEST(IntPercentageToDoublePolicyHandler, ApplyPolicySettingsClamp) {
POLICY_SCOPE_USER, base::Value::CreateIntegerValue(5), NULL);
prefs.Clear();
handler.ApplyPolicySettings(policy_map, &prefs);
- expected.reset(base::Value::CreateDoubleValue(0.05));
+ expected.reset(new base::FundamentalValue(0.05));
EXPECT_TRUE(prefs.GetValue(kTestPref, &value));
EXPECT_TRUE(base::Value::Equals(expected.get(), value));
@@ -446,7 +446,7 @@ TEST(IntPercentageToDoublePolicyHandler, ApplyPolicySettingsClamp) {
POLICY_SCOPE_USER, base::Value::CreateIntegerValue(10), NULL);
prefs.Clear();
handler.ApplyPolicySettings(policy_map, &prefs);
- expected.reset(base::Value::CreateDoubleValue(0.1));
+ expected.reset(new base::FundamentalValue(0.1));
EXPECT_TRUE(prefs.GetValue(kTestPref, &value));
EXPECT_TRUE(base::Value::Equals(expected.get(), value));
@@ -456,7 +456,7 @@ TEST(IntPercentageToDoublePolicyHandler, ApplyPolicySettingsClamp) {
POLICY_SCOPE_USER, base::Value::CreateIntegerValue(-5), NULL);
prefs.Clear();
handler.ApplyPolicySettings(policy_map, &prefs);
- expected.reset(base::Value::CreateDoubleValue(0.0));
+ expected.reset(new base::FundamentalValue(0.0));
EXPECT_TRUE(prefs.GetValue(kTestPref, &value));
EXPECT_TRUE(base::Value::Equals(expected.get(), value));
@@ -464,7 +464,7 @@ TEST(IntPercentageToDoublePolicyHandler, ApplyPolicySettingsClamp) {
POLICY_SCOPE_USER, base::Value::CreateIntegerValue(15), NULL);
prefs.Clear();
handler.ApplyPolicySettings(policy_map, &prefs);
- expected.reset(base::Value::CreateDoubleValue(0.1));
+ expected.reset(new base::FundamentalValue(0.1));
EXPECT_TRUE(prefs.GetValue(kTestPref, &value));
EXPECT_TRUE(base::Value::Equals(expected.get(), value));
}
@@ -485,7 +485,7 @@ TEST(IntPercentageToDoublePolicyHandler, ApplyPolicySettingsDontClamp) {
POLICY_SCOPE_USER, base::Value::CreateIntegerValue(0), NULL);
prefs.Clear();
handler.ApplyPolicySettings(policy_map, &prefs);
- expected.reset(base::Value::CreateDoubleValue(0.0));
+ expected.reset(new base::FundamentalValue(0.0));
EXPECT_TRUE(prefs.GetValue(kTestPref, &value));
EXPECT_TRUE(base::Value::Equals(expected.get(), value));
@@ -493,7 +493,7 @@ TEST(IntPercentageToDoublePolicyHandler, ApplyPolicySettingsDontClamp) {
POLICY_SCOPE_USER, base::Value::CreateIntegerValue(5), NULL);
prefs.Clear();
handler.ApplyPolicySettings(policy_map, &prefs);
- expected.reset(base::Value::CreateDoubleValue(0.05));
+ expected.reset(new base::FundamentalValue(0.05));
EXPECT_TRUE(prefs.GetValue(kTestPref, &value));
EXPECT_TRUE(base::Value::Equals(expected.get(), value));
@@ -501,7 +501,7 @@ TEST(IntPercentageToDoublePolicyHandler, ApplyPolicySettingsDontClamp) {
POLICY_SCOPE_USER, base::Value::CreateIntegerValue(10), NULL);
prefs.Clear();
handler.ApplyPolicySettings(policy_map, &prefs);
- expected.reset(base::Value::CreateDoubleValue(0.1));
+ expected.reset(new base::FundamentalValue(0.1));
EXPECT_TRUE(prefs.GetValue(kTestPref, &value));
EXPECT_TRUE(base::Value::Equals(expected.get(), value));
}

Powered by Google App Engine
This is Rietveld 408576698