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 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 3805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3816 EXPECT_FALSE(display_manager->unified_desktop_enabled()); | 3816 EXPECT_FALSE(display_manager->unified_desktop_enabled()); |
3817 } | 3817 } |
3818 | 3818 |
3819 class ArcPolicyTest : public PolicyTest { | 3819 class ArcPolicyTest : public PolicyTest { |
3820 public: | 3820 public: |
3821 ArcPolicyTest() {} | 3821 ArcPolicyTest() {} |
3822 ~ArcPolicyTest() override {} | 3822 ~ArcPolicyTest() override {} |
3823 | 3823 |
3824 protected: | 3824 protected: |
3825 void SetUpTest() { | 3825 void SetUpTest() { |
| 3826 // ArcAuthService functionality is available only when Arc is enabled. Use |
| 3827 // kEnableArc switch that activates it. |
| 3828 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| 3829 chromeos::switches::kEnableArc); |
3826 arc::ArcAuthService::DisableUIForTesting(); | 3830 arc::ArcAuthService::DisableUIForTesting(); |
3827 | 3831 |
3828 browser()->profile()->GetPrefs()->SetBoolean(prefs::kArcSignedIn, true); | 3832 browser()->profile()->GetPrefs()->SetBoolean(prefs::kArcSignedIn, true); |
3829 arc::ArcServiceManager::Get()->OnPrimaryUserProfilePrepared( | 3833 arc::ArcServiceManager::Get()->OnPrimaryUserProfilePrepared( |
3830 multi_user_util::GetAccountIdFromProfile(browser()->profile())); | 3834 multi_user_util::GetAccountIdFromProfile(browser()->profile())); |
3831 arc::ArcAuthService::Get()->OnPrimaryUserProfilePrepared( | 3835 arc::ArcAuthService::Get()->OnPrimaryUserProfilePrepared( |
3832 browser()->profile()); | 3836 browser()->profile()); |
3833 } | 3837 } |
3834 | 3838 |
3835 void TearDownTest() { | 3839 void TearDownTest() { |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4027 | 4031 |
4028 SetEmptyPolicy(); | 4032 SetEmptyPolicy(); |
4029 // Policy not set. | 4033 // Policy not set. |
4030 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); | 4034 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); |
4031 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); | 4035 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); |
4032 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); | 4036 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); |
4033 } | 4037 } |
4034 #endif // defined(OS_CHROMEOS) | 4038 #endif // defined(OS_CHROMEOS) |
4035 | 4039 |
4036 } // namespace policy | 4040 } // namespace policy |
OLD | NEW |