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 "chrome/browser/policy/device_cloud_policy_manager_chromeos.h" | 5 #include "chrome/browser/policy/device_cloud_policy_manager_chromeos.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 protected: | 40 protected: |
41 DeviceCloudPolicyManagerChromeOSTest() | 41 DeviceCloudPolicyManagerChromeOSTest() |
42 : cryptohome_library_(chromeos::CryptohomeLibrary::GetImpl(true)), | 42 : cryptohome_library_(chromeos::CryptohomeLibrary::GetImpl(true)), |
43 install_attributes_(cryptohome_library_.get()), | 43 install_attributes_(cryptohome_library_.get()), |
44 store_(new DeviceCloudPolicyStoreChromeOS(&device_settings_service_, | 44 store_(new DeviceCloudPolicyStoreChromeOS(&device_settings_service_, |
45 &install_attributes_)), | 45 &install_attributes_)), |
46 manager_(make_scoped_ptr(store_), &install_attributes_) {} | 46 manager_(make_scoped_ptr(store_), &install_attributes_) {} |
47 | 47 |
48 virtual void SetUp() OVERRIDE { | 48 virtual void SetUp() OVERRIDE { |
49 DeviceSettingsTestBase::SetUp(); | 49 DeviceSettingsTestBase::SetUp(); |
50 chrome::RegisterLocalState(local_state_.registry(), &local_state_); | 50 chrome::RegisterLocalState(&local_state_, local_state_.registry()); |
51 manager_.Init(); | 51 manager_.Init(); |
52 } | 52 } |
53 | 53 |
54 virtual void TearDown() OVERRIDE { | 54 virtual void TearDown() OVERRIDE { |
55 manager_.Shutdown(); | 55 manager_.Shutdown(); |
56 DeviceSettingsTestBase::TearDown(); | 56 DeviceSettingsTestBase::TearDown(); |
57 } | 57 } |
58 | 58 |
59 scoped_ptr<chromeos::CryptohomeLibrary> cryptohome_library_; | 59 scoped_ptr<chromeos::CryptohomeLibrary> cryptohome_library_; |
60 EnterpriseInstallAttributes install_attributes_; | 60 EnterpriseInstallAttributes install_attributes_; |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 TEST_F(DeviceCloudPolicyManagerChromeOSEnrollmentTest, LoadError) { | 339 TEST_F(DeviceCloudPolicyManagerChromeOSEnrollmentTest, LoadError) { |
340 loaded_blob_.clear(); | 340 loaded_blob_.clear(); |
341 RunTest(); | 341 RunTest(); |
342 ExpectFailedEnrollment(EnrollmentStatus::STATUS_STORE_ERROR); | 342 ExpectFailedEnrollment(EnrollmentStatus::STATUS_STORE_ERROR); |
343 EXPECT_EQ(CloudPolicyStore::STATUS_LOAD_ERROR, | 343 EXPECT_EQ(CloudPolicyStore::STATUS_LOAD_ERROR, |
344 status_.store_status()); | 344 status_.store_status()); |
345 } | 345 } |
346 | 346 |
347 } // namespace | 347 } // namespace |
348 } // namespace policy | 348 } // namespace policy |
OLD | NEW |