Chromium Code Reviews| 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) { |
|
bartfab (slow)
2016/02/16 15:23:00
This test duplicates what policy_test_cases.json d
Polina Bondarenko
2016/02/16 15:41:13
There are some tests that verify ArcEnabled pref i
bartfab (slow)
2016/02/16 15:44:22
Yes. ArcEnabled policy->pref is one unit test, Arc
|
| + PrefService* pref = browser()->profile()->GetPrefs(); |
|
bartfab (slow)
2016/02/16 15:23:00
Nit: const pointer.
Polina Bondarenko
2016/02/25 15:28:30
Done.
|
| + 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 |