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

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

Issue 12079097: Introduce PrefRegistrySyncable, simplifying PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again; base::File changes conflicted. Created 7 years, 10 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 | Annotate | Revision Log
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/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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/policy/cloud_policy_core_unittest.cc ('k') | chrome/browser/policy/policy_statistics_collector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698