Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Side by Side Diff: chrome/browser/chromeos/system/device_disabling_manager_unittest.cc

Issue 2737733003: Add Active Directory login UI tests (Closed)
Patch Set: Rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 void DeviceDisablingManagerTestBase::LogIn() { 104 void DeviceDisablingManagerTestBase::LogIn() {
105 fake_user_manager_.AddUser(AccountId::FromUserEmail(kTestUser)); 105 fake_user_manager_.AddUser(AccountId::FromUserEmail(kTestUser));
106 } 106 }
107 107
108 void DeviceDisablingManagerTestBase::SetUnowned() { 108 void DeviceDisablingManagerTestBase::SetUnowned() {
109 GetInstallAttributes()->Clear(); 109 GetInstallAttributes()->Clear();
110 } 110 }
111 111
112 void DeviceDisablingManagerTestBase::SetEnterpriseOwned() { 112 void DeviceDisablingManagerTestBase::SetEnterpriseOwned() {
113 GetInstallAttributes()->SetEnterprise(kEnrollmentDomain, "fake-id"); 113 GetInstallAttributes()->SetCloudManaged(kEnrollmentDomain, "fake-id");
114 } 114 }
115 115
116 void DeviceDisablingManagerTestBase::SetConsumerOwned() { 116 void DeviceDisablingManagerTestBase::SetConsumerOwned() {
117 GetInstallAttributes()->SetConsumer(); 117 GetInstallAttributes()->SetConsumerOwned();
118 } 118 }
119 119
120 chromeos::StubInstallAttributes* 120 chromeos::StubInstallAttributes*
121 DeviceDisablingManagerTestBase::GetInstallAttributes() { 121 DeviceDisablingManagerTestBase::GetInstallAttributes() {
122 return static_cast<chromeos::StubInstallAttributes*>( 122 return static_cast<chromeos::StubInstallAttributes*>(
123 TestingBrowserProcess::GetGlobal() 123 TestingBrowserProcess::GetGlobal()
124 ->platform_part() 124 ->platform_part()
125 ->browser_policy_connector_chromeos() 125 ->browser_policy_connector_chromeos()
126 ->GetInstallAttributes()); 126 ->GetInstallAttributes());
127 } 127 }
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation()); 493 DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation());
494 494
495 // Not enterprise owned, disabled by flag. 495 // Not enterprise owned, disabled by flag.
496 SetUnowned(); 496 SetUnowned();
497 EXPECT_FALSE( 497 EXPECT_FALSE(
498 DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation()); 498 DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation());
499 } 499 }
500 500
501 } // namespace system 501 } // namespace system
502 } // namespace chromeos 502 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698