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

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

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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/user_cloud_policy_manager_chromeos.h" 5 #include "chrome/browser/policy/user_cloud_policy_manager_chromeos.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chrome/browser/policy/mock_cloud_policy_store.h" 10 #include "chrome/browser/policy/mock_cloud_policy_store.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 // Required by the refresh scheduler that's created by the manager. 82 // Required by the refresh scheduler that's created by the manager.
83 MessageLoop loop_; 83 MessageLoop loop_;
84 84
85 // Convenience policy objects. 85 // Convenience policy objects.
86 em::DeviceManagementResponse policy_blob_; 86 em::DeviceManagementResponse policy_blob_;
87 PolicyMap policy_map_; 87 PolicyMap policy_map_;
88 PolicyBundle expected_bundle_; 88 PolicyBundle expected_bundle_;
89 89
90 // Policy infrastructure. 90 // Policy infrastructure.
91 TestingPrefService prefs_; 91 TestingPrefServiceSimple prefs_;
92 MockConfigurationPolicyObserver observer_; 92 MockConfigurationPolicyObserver observer_;
93 MockDeviceManagementService device_management_service_; 93 MockDeviceManagementService device_management_service_;
94 MockCloudPolicyStore* store_; 94 MockCloudPolicyStore* store_;
95 scoped_ptr<UserCloudPolicyManagerChromeOS> manager_; 95 scoped_ptr<UserCloudPolicyManagerChromeOS> manager_;
96 96
97 private: 97 private:
98 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerChromeOSTest); 98 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerChromeOSTest);
99 }; 99 };
100 100
101 TEST_F(UserCloudPolicyManagerChromeOSTest, WaitForPolicyFetch) { 101 TEST_F(UserCloudPolicyManagerChromeOSTest, WaitForPolicyFetch) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 // Cancelling the initial fetch should flip the flag. 154 // Cancelling the initial fetch should flip the flag.
155 EXPECT_CALL(observer_, OnUpdatePolicy(manager_.get())); 155 EXPECT_CALL(observer_, OnUpdatePolicy(manager_.get()));
156 manager_->CancelWaitForPolicyFetch(); 156 manager_->CancelWaitForPolicyFetch();
157 EXPECT_TRUE(manager_->IsInitializationComplete()); 157 EXPECT_TRUE(manager_->IsInitializationComplete());
158 Mock::VerifyAndClearExpectations(&observer_); 158 Mock::VerifyAndClearExpectations(&observer_);
159 } 159 }
160 160
161 } // namespace 161 } // namespace
162 } // namespace policy 162 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/url_blacklist_manager_unittest.cc ('k') | chrome/browser/policy/user_policy_signin_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698