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..36c9c2a485440f60b6eb577c34a22b972a528f25 100644 |
--- a/components/policy/core/browser/configuration_policy_handler_unittest.cc |
+++ b/components/policy/core/browser/configuration_policy_handler_unittest.cc |
@@ -130,34 +130,49 @@ TEST(IntRangePolicyHandler, CheckPolicySettingsClamp) { |
IntRangePolicyHandler handler(kTestPolicy, kTestPref, 0, 10, true); |
// Check that values lying in the accepted range are not rejected. |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(0), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(0), |
+ NULL); |
errors.Clear(); |
EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); |
EXPECT_TRUE(errors.empty()); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(5), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(5), |
+ NULL); |
errors.Clear(); |
EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); |
EXPECT_TRUE(errors.empty()); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(10), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(10), |
+ NULL); |
errors.Clear(); |
EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); |
EXPECT_TRUE(errors.empty()); |
// Check that values lying outside the accepted range are not rejected |
// (because clamping is enabled) but do yield a warning message. |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(-5), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(-5), |
+ NULL); |
errors.Clear(); |
EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); |
EXPECT_FALSE(errors.empty()); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(15), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(15), |
+ NULL); |
errors.Clear(); |
EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); |
EXPECT_FALSE(errors.empty()); |
@@ -181,34 +196,49 @@ TEST(IntRangePolicyHandler, CheckPolicySettingsDontClamp) { |
IntRangePolicyHandler handler(kTestPolicy, kTestPref, 0, 10, false); |
// Check that values lying in the accepted range are not rejected. |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(0), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(0), |
+ NULL); |
errors.Clear(); |
EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); |
EXPECT_TRUE(errors.empty()); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(5), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(5), |
+ NULL); |
errors.Clear(); |
EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); |
EXPECT_TRUE(errors.empty()); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(10), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(10), |
+ NULL); |
errors.Clear(); |
EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); |
EXPECT_TRUE(errors.empty()); |
// Check that values lying outside the accepted range are rejected and yield |
// an error message. |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(-5), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(-5), |
+ NULL); |
errors.Clear(); |
EXPECT_FALSE(handler.CheckPolicySettings(policy_map, &errors)); |
EXPECT_FALSE(errors.empty()); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(15), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(15), |
+ NULL); |
errors.Clear(); |
EXPECT_FALSE(handler.CheckPolicySettings(policy_map, &errors)); |
EXPECT_FALSE(errors.empty()); |
@@ -233,45 +263,60 @@ TEST(IntRangePolicyHandler, ApplyPolicySettingsClamp) { |
IntRangePolicyHandler handler(kTestPolicy, kTestPref, 0, 10, true); |
// Check that values lying in the accepted range are written to the pref. |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(0), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(0), |
+ NULL); |
prefs.Clear(); |
handler.ApplyPolicySettings(policy_map, &prefs); |
- expected.reset(base::Value::CreateIntegerValue(0)); |
+ expected.reset(new base::FundamentalValue(0)); |
EXPECT_TRUE(prefs.GetValue(kTestPref, &value)); |
EXPECT_TRUE(base::Value::Equals(expected.get(), value)); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(5), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(5), |
+ NULL); |
prefs.Clear(); |
handler.ApplyPolicySettings(policy_map, &prefs); |
- expected.reset(base::Value::CreateIntegerValue(5)); |
+ expected.reset(new base::FundamentalValue(5)); |
EXPECT_TRUE(prefs.GetValue(kTestPref, &value)); |
EXPECT_TRUE(base::Value::Equals(expected.get(), value)); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(10), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(10), |
+ NULL); |
prefs.Clear(); |
handler.ApplyPolicySettings(policy_map, &prefs); |
- expected.reset(base::Value::CreateIntegerValue(10)); |
+ expected.reset(new base::FundamentalValue(10)); |
EXPECT_TRUE(prefs.GetValue(kTestPref, &value)); |
EXPECT_TRUE(base::Value::Equals(expected.get(), value)); |
// Check that values lying outside the accepted range are clamped and written |
// to the pref. |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(-5), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(-5), |
+ NULL); |
prefs.Clear(); |
handler.ApplyPolicySettings(policy_map, &prefs); |
- expected.reset(base::Value::CreateIntegerValue(0)); |
+ expected.reset(new base::FundamentalValue(0)); |
EXPECT_TRUE(prefs.GetValue(kTestPref, &value)); |
EXPECT_TRUE(base::Value::Equals(expected.get(), value)); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(15), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(15), |
+ NULL); |
prefs.Clear(); |
handler.ApplyPolicySettings(policy_map, &prefs); |
- expected.reset(base::Value::CreateIntegerValue(10)); |
+ expected.reset(new base::FundamentalValue(10)); |
EXPECT_TRUE(prefs.GetValue(kTestPref, &value)); |
EXPECT_TRUE(base::Value::Equals(expected.get(), value)); |
} |
@@ -287,27 +332,36 @@ TEST(IntRangePolicyHandler, ApplyPolicySettingsDontClamp) { |
IntRangePolicyHandler handler(kTestPolicy, kTestPref, 0, 10, true); |
// Check that values lying in the accepted range are written to the pref. |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(0), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(0), |
+ NULL); |
prefs.Clear(); |
handler.ApplyPolicySettings(policy_map, &prefs); |
- expected.reset(base::Value::CreateIntegerValue(0)); |
+ expected.reset(new base::FundamentalValue(0)); |
EXPECT_TRUE(prefs.GetValue(kTestPref, &value)); |
EXPECT_TRUE(base::Value::Equals(expected.get(), value)); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(5), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(5), |
+ NULL); |
prefs.Clear(); |
handler.ApplyPolicySettings(policy_map, &prefs); |
- expected.reset(base::Value::CreateIntegerValue(5)); |
+ expected.reset(new base::FundamentalValue(5)); |
EXPECT_TRUE(prefs.GetValue(kTestPref, &value)); |
EXPECT_TRUE(base::Value::Equals(expected.get(), value)); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(10), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(10), |
+ NULL); |
prefs.Clear(); |
handler.ApplyPolicySettings(policy_map, &prefs); |
- expected.reset(base::Value::CreateIntegerValue(10)); |
+ expected.reset(new base::FundamentalValue(10)); |
EXPECT_TRUE(prefs.GetValue(kTestPref, &value)); |
EXPECT_TRUE(base::Value::Equals(expected.get(), value)); |
} |
@@ -322,34 +376,49 @@ TEST(IntPercentageToDoublePolicyHandler, CheckPolicySettingsClamp) { |
kTestPolicy, kTestPref, 0, 10, true); |
// Check that values lying in the accepted range are not rejected. |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(0), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(0), |
+ NULL); |
errors.Clear(); |
EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); |
EXPECT_TRUE(errors.empty()); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(5), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(5), |
+ NULL); |
errors.Clear(); |
EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); |
EXPECT_TRUE(errors.empty()); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(10), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(10), |
+ NULL); |
errors.Clear(); |
EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); |
EXPECT_TRUE(errors.empty()); |
// Check that values lying outside the accepted range are not rejected |
// (because clamping is enabled) but do yield a warning message. |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(-5), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(-5), |
+ NULL); |
errors.Clear(); |
EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); |
EXPECT_FALSE(errors.empty()); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(15), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(15), |
+ NULL); |
errors.Clear(); |
EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); |
EXPECT_FALSE(errors.empty()); |
@@ -373,34 +442,49 @@ TEST(IntPercentageToDoublePolicyHandler, CheckPolicySettingsDontClamp) { |
kTestPolicy, kTestPref, 0, 10, false); |
// Check that values lying in the accepted range are not rejected. |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(0), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(0), |
+ NULL); |
errors.Clear(); |
EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); |
EXPECT_TRUE(errors.empty()); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(5), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(5), |
+ NULL); |
errors.Clear(); |
EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); |
EXPECT_TRUE(errors.empty()); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(10), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(10), |
+ NULL); |
errors.Clear(); |
EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); |
EXPECT_TRUE(errors.empty()); |
// Check that values lying outside the accepted range are rejected and yield |
// an error message. |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(-5), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(-5), |
+ NULL); |
errors.Clear(); |
EXPECT_FALSE(handler.CheckPolicySettings(policy_map, &errors)); |
EXPECT_FALSE(errors.empty()); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(15), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(15), |
+ NULL); |
errors.Clear(); |
EXPECT_FALSE(handler.CheckPolicySettings(policy_map, &errors)); |
EXPECT_FALSE(errors.empty()); |
@@ -426,24 +510,33 @@ TEST(IntPercentageToDoublePolicyHandler, ApplyPolicySettingsClamp) { |
kTestPolicy, kTestPref, 0, 10, true); |
// Check that values lying in the accepted range are written to the pref. |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(0), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(0), |
+ NULL); |
prefs.Clear(); |
handler.ApplyPolicySettings(policy_map, &prefs); |
expected.reset(base::Value::CreateDoubleValue(0.0)); |
EXPECT_TRUE(prefs.GetValue(kTestPref, &value)); |
EXPECT_TRUE(base::Value::Equals(expected.get(), value)); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(5), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(5), |
+ NULL); |
prefs.Clear(); |
handler.ApplyPolicySettings(policy_map, &prefs); |
expected.reset(base::Value::CreateDoubleValue(0.05)); |
EXPECT_TRUE(prefs.GetValue(kTestPref, &value)); |
EXPECT_TRUE(base::Value::Equals(expected.get(), value)); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(10), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(10), |
+ NULL); |
prefs.Clear(); |
handler.ApplyPolicySettings(policy_map, &prefs); |
expected.reset(base::Value::CreateDoubleValue(0.1)); |
@@ -452,16 +545,22 @@ TEST(IntPercentageToDoublePolicyHandler, ApplyPolicySettingsClamp) { |
// Check that values lying outside the accepted range are clamped and written |
// to the pref. |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(-5), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(-5), |
+ NULL); |
prefs.Clear(); |
handler.ApplyPolicySettings(policy_map, &prefs); |
expected.reset(base::Value::CreateDoubleValue(0.0)); |
EXPECT_TRUE(prefs.GetValue(kTestPref, &value)); |
EXPECT_TRUE(base::Value::Equals(expected.get(), value)); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(15), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(15), |
+ NULL); |
prefs.Clear(); |
handler.ApplyPolicySettings(policy_map, &prefs); |
expected.reset(base::Value::CreateDoubleValue(0.1)); |
@@ -481,24 +580,33 @@ TEST(IntPercentageToDoublePolicyHandler, ApplyPolicySettingsDontClamp) { |
kTestPolicy, kTestPref, 0, 10, true); |
// Check that values lying in the accepted range are written to the pref. |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(0), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(0), |
+ NULL); |
prefs.Clear(); |
handler.ApplyPolicySettings(policy_map, &prefs); |
expected.reset(base::Value::CreateDoubleValue(0.0)); |
EXPECT_TRUE(prefs.GetValue(kTestPref, &value)); |
EXPECT_TRUE(base::Value::Equals(expected.get(), value)); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(5), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(5), |
+ NULL); |
prefs.Clear(); |
handler.ApplyPolicySettings(policy_map, &prefs); |
expected.reset(base::Value::CreateDoubleValue(0.05)); |
EXPECT_TRUE(prefs.GetValue(kTestPref, &value)); |
EXPECT_TRUE(base::Value::Equals(expected.get(), value)); |
- policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, base::Value::CreateIntegerValue(10), NULL); |
+ policy_map.Set(kTestPolicy, |
+ POLICY_LEVEL_MANDATORY, |
+ POLICY_SCOPE_USER, |
+ new base::FundamentalValue(10), |
+ NULL); |
prefs.Clear(); |
handler.ApplyPolicySettings(policy_map, &prefs); |
expected.reset(base::Value::CreateDoubleValue(0.1)); |