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

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

Issue 1684063002: Add ArcEnabled policy implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@26869593
Patch Set: Created 4 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/policy_browsertest.cc
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index 6817c64effadeedef78139e1ed77c65f9fed9c6f..676299a362ff3b53bba1694479dd56c8f5b0a615 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -3942,6 +3942,33 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, UnifiedDesktopEnabledByDefault) {
UpdateProviderPolicy(policies);
EXPECT_FALSE(display_manager->unified_desktop_enabled());
}
+
+// Test ArcEnabled policy mapping.
+IN_PROC_BROWSER_TEST_F(PolicyTest, ArcEnabled) {
+ PrefService* pref = browser()->profile()->GetPrefs();
+ EXPECT_FALSE(pref->GetBoolean(prefs::kArcEnabled));
+
+ // Enable ARC.
+ PolicyMap policies;
+ policies.Set(key::kArcEnabled,
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ POLICY_SOURCE_CLOUD,
+ new base::FundamentalValue(true),
+ NULL);
+ UpdateProviderPolicy(policies);
+ EXPECT_TRUE(pref->GetBoolean(prefs::kArcEnabled));
+
+ // Disable ARC.
+ policies.Set(key::kArcEnabled,
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ POLICY_SOURCE_CLOUD,
+ new base::FundamentalValue(false),
+ NULL);
+ UpdateProviderPolicy(policies);
+ EXPECT_FALSE(pref->GetBoolean(prefs::kArcEnabled));
+}
#endif // defined(OS_CHROMEOS)
} // namespace policy

Powered by Google App Engine
This is Rietveld 408576698