OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 3924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3935 EXPECT_TRUE(display_manager->unified_desktop_enabled()); | 3935 EXPECT_TRUE(display_manager->unified_desktop_enabled()); |
3936 policies.Set(key::kUnifiedDesktopEnabledByDefault, | 3936 policies.Set(key::kUnifiedDesktopEnabledByDefault, |
3937 POLICY_LEVEL_MANDATORY, | 3937 POLICY_LEVEL_MANDATORY, |
3938 POLICY_SCOPE_USER, | 3938 POLICY_SCOPE_USER, |
3939 POLICY_SOURCE_CLOUD, | 3939 POLICY_SOURCE_CLOUD, |
3940 new base::FundamentalValue(false), | 3940 new base::FundamentalValue(false), |
3941 NULL); | 3941 NULL); |
3942 UpdateProviderPolicy(policies); | 3942 UpdateProviderPolicy(policies); |
3943 EXPECT_FALSE(display_manager->unified_desktop_enabled()); | 3943 EXPECT_FALSE(display_manager->unified_desktop_enabled()); |
3944 } | 3944 } |
3945 | |
3946 // Test ArcEnabled policy mapping. | |
3947 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
| |
3948 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.
| |
3949 EXPECT_FALSE(pref->GetBoolean(prefs::kArcEnabled)); | |
3950 | |
3951 // Enable ARC. | |
3952 PolicyMap policies; | |
3953 policies.Set(key::kArcEnabled, | |
3954 POLICY_LEVEL_MANDATORY, | |
3955 POLICY_SCOPE_USER, | |
3956 POLICY_SOURCE_CLOUD, | |
3957 new base::FundamentalValue(true), | |
3958 NULL); | |
3959 UpdateProviderPolicy(policies); | |
3960 EXPECT_TRUE(pref->GetBoolean(prefs::kArcEnabled)); | |
3961 | |
3962 // Disable ARC. | |
3963 policies.Set(key::kArcEnabled, | |
3964 POLICY_LEVEL_MANDATORY, | |
3965 POLICY_SCOPE_USER, | |
3966 POLICY_SOURCE_CLOUD, | |
3967 new base::FundamentalValue(false), | |
3968 NULL); | |
3969 UpdateProviderPolicy(policies); | |
3970 EXPECT_FALSE(pref->GetBoolean(prefs::kArcEnabled)); | |
3971 } | |
3945 #endif // defined(OS_CHROMEOS) | 3972 #endif // defined(OS_CHROMEOS) |
3946 | 3973 |
3947 } // namespace policy | 3974 } // namespace policy |
OLD | NEW |