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

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

Issue 2702893002: Revert of Skip ARC initial screen when everything is set up by policy (Closed)
Patch Set: 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
« no previous file with comments | « chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/policy_browsertest.cc
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index bade3cf44661088212abf40f58c72024b49ba963..292b004e65a0ea7e4edcf91a74d61ebaa901b0d7 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -4168,17 +4168,13 @@
// Test ArcBackupRestoreEnabled policy.
IN_PROC_BROWSER_TEST_F(ArcPolicyTest, ArcBackupRestoreEnabled) {
- PrefService* const pref = browser()->profile()->GetPrefs();
-
- // ARC Backup & Restore is switched off by default.
- EXPECT_FALSE(pref->GetBoolean(prefs::kArcBackupRestoreEnabled));
+ const PrefService* const pref = browser()->profile()->GetPrefs();
+
+ // ARC Backup & Restore is switched on by default.
+ EXPECT_TRUE(pref->GetBoolean(prefs::kArcBackupRestoreEnabled));
EXPECT_FALSE(pref->IsManagedPreference(prefs::kArcBackupRestoreEnabled));
- // Switch on ARC Backup & Restore in the user prefs.
- pref->SetBoolean(prefs::kArcBackupRestoreEnabled, true);
- EXPECT_TRUE(pref->GetBoolean(prefs::kArcBackupRestoreEnabled));
-
- // Disable ARC Backup & Restore through the policy.
+ // Disable ARC Backup & Restore.
PolicyMap policies;
policies.Set(key::kArcBackupRestoreEnabled, POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
@@ -4187,7 +4183,7 @@
EXPECT_FALSE(pref->GetBoolean(prefs::kArcBackupRestoreEnabled));
EXPECT_TRUE(pref->IsManagedPreference(prefs::kArcBackupRestoreEnabled));
- // Enable ARC Backup & Restore through the policy.
+ // Enable ARC Backup & Restore.
policies.Set(key::kArcBackupRestoreEnabled, POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
base::MakeUnique<base::FundamentalValue>(true), nullptr);
@@ -4199,7 +4195,7 @@
// Test ArcLocationServiceEnabled policy and its interplay with the
// DefaultGeolocationSetting policy.
IN_PROC_BROWSER_TEST_F(ArcPolicyTest, ArcLocationServiceEnabled) {
- PrefService* const pref = browser()->profile()->GetPrefs();
+ const PrefService* const pref = browser()->profile()->GetPrefs();
// Values of the ArcLocationServiceEnabled policy to be tested.
const std::vector<base::Value> test_policy_values = {
@@ -4214,14 +4210,6 @@
base::FundamentalValue(2), // 'BlockGeolocation'
base::FundamentalValue(3), // 'AskGeolocation'
};
-
- // The pref is switched off by default.
- EXPECT_FALSE(pref->GetBoolean(prefs::kArcLocationServiceEnabled));
- EXPECT_FALSE(pref->IsManagedPreference(prefs::kArcLocationServiceEnabled));
-
- // Switch on the pref in the user prefs.
- pref->SetBoolean(prefs::kArcLocationServiceEnabled, true);
- EXPECT_TRUE(pref->GetBoolean(prefs::kArcLocationServiceEnabled));
for (const auto& test_policy_value : test_policy_values) {
for (const auto& test_default_geo_policy_value :
« no previous file with comments | « chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698