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

Side by Side Diff: chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos_unittest.cc

Issue 2403053003: Remove unused email from install attributes and add support for AD. (Closed)
Patch Set: Address Maksim's comments. Created 4 years, 2 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 (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 "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 190
191 chromeos::DeviceOAuth2TokenServiceFactory::Shutdown(); 191 chromeos::DeviceOAuth2TokenServiceFactory::Shutdown();
192 chromeos::SystemSaltGetter::Shutdown(); 192 chromeos::SystemSaltGetter::Shutdown();
193 TestingBrowserProcess::GetGlobal()->SetLocalState(NULL); 193 TestingBrowserProcess::GetGlobal()->SetLocalState(NULL);
194 } 194 }
195 195
196 void LockDevice() { 196 void LockDevice() {
197 base::RunLoop loop; 197 base::RunLoop loop;
198 chromeos::InstallAttributes::LockResult result; 198 chromeos::InstallAttributes::LockResult result;
199 install_attributes_->LockDevice( 199 install_attributes_->LockDevice(
200 PolicyBuilder::kFakeUsername,
201 DEVICE_MODE_ENTERPRISE, 200 DEVICE_MODE_ENTERPRISE,
201 PolicyBuilder::kFakeDomain,
202 std::string(), // realm
202 PolicyBuilder::kFakeDeviceId, 203 PolicyBuilder::kFakeDeviceId,
203 base::Bind(&CopyLockResult, &loop, &result)); 204 base::Bind(&CopyLockResult, &loop, &result));
204 loop.Run(); 205 loop.Run();
205 ASSERT_EQ(chromeos::InstallAttributes::LOCK_SUCCESS, result); 206 ASSERT_EQ(chromeos::InstallAttributes::LOCK_SUCCESS, result);
206 } 207 }
207 208
208 void ConnectManager() { 209 void ConnectManager() {
209 std::unique_ptr<chromeos::attestation::AttestationFlow> unique_flow( 210 std::unique_ptr<chromeos::attestation::AttestationFlow> unique_flow(
210 CreateAttestationFlow()); 211 CreateAttestationFlow());
211 manager_->Initialize(&local_state_); 212 manager_->Initialize(&local_state_);
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 DeviceCloudPolicyManagerChromeOSEnrollmentTest, 798 DeviceCloudPolicyManagerChromeOSEnrollmentTest,
798 ::testing::Values(false, true)); 799 ::testing::Values(false, true));
799 800
800 INSTANTIATE_TEST_CASE_P( 801 INSTANTIATE_TEST_CASE_P(
801 Cert, 802 Cert,
802 DeviceCloudPolicyManagerChromeOSEnrollmentBlankSystemSaltTest, 803 DeviceCloudPolicyManagerChromeOSEnrollmentBlankSystemSaltTest,
803 ::testing::Values(false, true)); 804 ::testing::Values(false, true));
804 805
805 } // namespace 806 } // namespace
806 } // namespace policy 807 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698