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

Unified Diff: chrome/browser/policy/default_geolocation_policy_handler_unittest.cc

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 years, 10 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: chrome/browser/policy/default_geolocation_policy_handler_unittest.cc
diff --git a/chrome/browser/policy/default_geolocation_policy_handler_unittest.cc b/chrome/browser/policy/default_geolocation_policy_handler_unittest.cc
index 41eb2d5f7f043858ff59bf4ab3bb7160157be525..628623c589d6d1252b0f0eb447e12dbbb95a6fc4 100644
--- a/chrome/browser/policy/default_geolocation_policy_handler_unittest.cc
+++ b/chrome/browser/policy/default_geolocation_policy_handler_unittest.cc
@@ -30,11 +30,9 @@ TEST_F(DefaultGeolocationPolicyHandlerTest, AllowGeolocation) {
// should not translate to the ArcLocationServiceEnabled preference.
EXPECT_FALSE(store_->GetValue(prefs::kArcLocationServiceEnabled, nullptr));
PolicyMap policy;
- policy.Set(key::kDefaultGeolocationSetting,
- POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
- base::WrapUnique(new base::FundamentalValue(CONTENT_SETTING_ALLOW)),
- nullptr);
+ policy.Set(key::kDefaultGeolocationSetting, POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
+ base::WrapUnique(new base::Value(CONTENT_SETTING_ALLOW)), nullptr);
UpdateProviderPolicy(policy);
EXPECT_FALSE(store_->GetValue(prefs::kArcLocationServiceEnabled, nullptr));
}
@@ -44,15 +42,13 @@ TEST_F(DefaultGeolocationPolicyHandlerTest, BlockGeolocation) {
// should set the ArcLocationServiceEnabled preference to false.
EXPECT_FALSE(store_->GetValue(prefs::kArcLocationServiceEnabled, nullptr));
PolicyMap policy;
- policy.Set(key::kDefaultGeolocationSetting,
- POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
- base::WrapUnique(new base::FundamentalValue(CONTENT_SETTING_BLOCK)),
- nullptr);
+ policy.Set(key::kDefaultGeolocationSetting, POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
+ base::WrapUnique(new base::Value(CONTENT_SETTING_BLOCK)), nullptr);
UpdateProviderPolicy(policy);
const base::Value* value = nullptr;
EXPECT_TRUE(store_->GetValue(prefs::kArcLocationServiceEnabled, &value));
- EXPECT_TRUE(base::FundamentalValue(false).Equals(value));
+ EXPECT_TRUE(base::Value(false).Equals(value));
}
TEST_F(DefaultGeolocationPolicyHandlerTest, AskGeolocation) {
@@ -60,11 +56,9 @@ TEST_F(DefaultGeolocationPolicyHandlerTest, AskGeolocation) {
// not translate to the ArcLocationServiceEnabled preference.
EXPECT_FALSE(store_->GetValue(prefs::kArcLocationServiceEnabled, nullptr));
PolicyMap policy;
- policy.Set(key::kDefaultGeolocationSetting,
- POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
- base::WrapUnique(new base::FundamentalValue(CONTENT_SETTING_ASK)),
- nullptr);
+ policy.Set(key::kDefaultGeolocationSetting, POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
+ base::WrapUnique(new base::Value(CONTENT_SETTING_ASK)), nullptr);
UpdateProviderPolicy(policy);
EXPECT_FALSE(store_->GetValue(prefs::kArcLocationServiceEnabled, nullptr));
}

Powered by Google App Engine
This is Rietveld 408576698