OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/chromeos/system/device_disabling_manager.h" | 5 #include "chrome/browser/chromeos/system/device_disabling_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 void DeviceDisablingManagerTestBase::TearDown() { | 89 void DeviceDisablingManagerTestBase::TearDown() { |
90 DestroyDeviceDisablingManager(); | 90 DestroyDeviceDisablingManager(); |
91 } | 91 } |
92 | 92 |
93 void DeviceDisablingManagerTestBase::CreateDeviceDisablingManager() { | 93 void DeviceDisablingManagerTestBase::CreateDeviceDisablingManager() { |
94 device_disabling_manager_.reset(new DeviceDisablingManager( | 94 device_disabling_manager_.reset(new DeviceDisablingManager( |
95 this, | 95 this, |
96 CrosSettings::Get(), | 96 CrosSettings::Get(), |
97 &fake_user_manager_)); | 97 &fake_user_manager_)); |
| 98 device_disabling_manager_->Init(); |
98 } | 99 } |
99 | 100 |
100 void DeviceDisablingManagerTestBase::DestroyDeviceDisablingManager() { | 101 void DeviceDisablingManagerTestBase::DestroyDeviceDisablingManager() { |
101 device_disabling_manager_.reset(); | 102 device_disabling_manager_.reset(); |
102 } | 103 } |
103 | 104 |
104 void DeviceDisablingManagerTestBase::LogIn() { | 105 void DeviceDisablingManagerTestBase::LogIn() { |
105 fake_user_manager_.AddUser(AccountId::FromUserEmail(kTestUser)); | 106 fake_user_manager_.AddUser(AccountId::FromUserEmail(kTestUser)); |
106 } | 107 } |
107 | 108 |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation()); | 494 DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation()); |
494 | 495 |
495 // Not enterprise owned, disabled by flag. | 496 // Not enterprise owned, disabled by flag. |
496 SetUnowned(); | 497 SetUnowned(); |
497 EXPECT_FALSE( | 498 EXPECT_FALSE( |
498 DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation()); | 499 DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation()); |
499 } | 500 } |
500 | 501 |
501 } // namespace system | 502 } // namespace system |
502 } // namespace chromeos | 503 } // namespace chromeos |
OLD | NEW |