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/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 policy::StubEnterpriseInstallAttributes* install_attributes = | 105 policy::StubEnterpriseInstallAttributes* install_attributes = |
106 static_cast<policy::StubEnterpriseInstallAttributes*>( | 106 static_cast<policy::StubEnterpriseInstallAttributes*>( |
107 TestingBrowserProcess::GetGlobal()->platform_part()-> | 107 TestingBrowserProcess::GetGlobal()->platform_part()-> |
108 browser_policy_connector_chromeos()->GetInstallAttributes()); | 108 browser_policy_connector_chromeos()->GetInstallAttributes()); |
109 install_attributes->SetDomain(enrollment_domain); | 109 install_attributes->SetDomain(enrollment_domain); |
110 install_attributes->SetRegistrationUser(registration_user); | 110 install_attributes->SetRegistrationUser(registration_user); |
111 install_attributes->SetMode(device_mode); | 111 install_attributes->SetMode(device_mode); |
112 } | 112 } |
113 | 113 |
114 void DeviceDisablingManagerTestBase::LogIn() { | 114 void DeviceDisablingManagerTestBase::LogIn() { |
115 fake_user_manager_.AddUser(kTestUser); | 115 fake_user_manager_.AddUser(AccountId::FromUserEmail(kTestUser)); |
116 } | 116 } |
117 | 117 |
118 // Base class for tests that verify device disabling behavior during OOBE, when | 118 // Base class for tests that verify device disabling behavior during OOBE, when |
119 // the device is not owned yet. | 119 // the device is not owned yet. |
120 class DeviceDisablingManagerOOBETest : public DeviceDisablingManagerTestBase { | 120 class DeviceDisablingManagerOOBETest : public DeviceDisablingManagerTestBase { |
121 public: | 121 public: |
122 DeviceDisablingManagerOOBETest(); | 122 DeviceDisablingManagerOOBETest(); |
123 | 123 |
124 // DeviceDisablingManagerTestBase: | 124 // DeviceDisablingManagerTestBase: |
125 void SetUp() override; | 125 void SetUp() override; |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation()); | 507 DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation()); |
508 | 508 |
509 // Not enterprise owned, disabled by flag. | 509 // Not enterprise owned, disabled by flag. |
510 SetUnowned(); | 510 SetUnowned(); |
511 EXPECT_FALSE( | 511 EXPECT_FALSE( |
512 DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation()); | 512 DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation()); |
513 } | 513 } |
514 | 514 |
515 } // namespace system | 515 } // namespace system |
516 } // namespace chromeos | 516 } // namespace chromeos |
OLD | NEW |