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

Side by Side Diff: chrome/browser/policy/cloud/cloud_policy_manager_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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/cloud/cloud_policy_manager.h" 5 #include "chrome/browser/policy/cloud/cloud_policy_manager.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/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 Mock::VerifyAndClearExpectations(&store_); 172 Mock::VerifyAndClearExpectations(&store_);
173 manager_->AddObserver(&observer_); 173 manager_->AddObserver(&observer_);
174 } 174 }
175 175
176 virtual void TearDown() OVERRIDE { 176 virtual void TearDown() OVERRIDE {
177 manager_->RemoveObserver(&observer_); 177 manager_->RemoveObserver(&observer_);
178 manager_->Shutdown(); 178 manager_->Shutdown();
179 } 179 }
180 180
181 // Required by the refresh scheduler that's created by the manager. 181 // Required by the refresh scheduler that's created by the manager.
182 MessageLoop loop_; 182 base::MessageLoop loop_;
183 183
184 // Testing policy. 184 // Testing policy.
185 const PolicyNamespaceKey policy_ns_key_; 185 const PolicyNamespaceKey policy_ns_key_;
186 UserPolicyBuilder policy_; 186 UserPolicyBuilder policy_;
187 PolicyMap policy_map_; 187 PolicyMap policy_map_;
188 PolicyBundle expected_bundle_; 188 PolicyBundle expected_bundle_;
189 189
190 // Policy infrastructure. 190 // Policy infrastructure.
191 MockConfigurationPolicyObserver observer_; 191 MockConfigurationPolicyObserver observer_;
192 MockCloudPolicyStore store_; 192 MockCloudPolicyStore store_;
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 store_.policy_.reset(new em::PolicyData(policy_.policy_data())); 331 store_.policy_.reset(new em::PolicyData(policy_.policy_data()));
332 EXPECT_CALL(observer_, OnUpdatePolicy(manager_.get())); 332 EXPECT_CALL(observer_, OnUpdatePolicy(manager_.get()));
333 store_.NotifyStoreError(); 333 store_.NotifyStoreError();
334 Mock::VerifyAndClearExpectations(&observer_); 334 Mock::VerifyAndClearExpectations(&observer_);
335 335
336 EXPECT_TRUE(manager_->IsInitializationComplete(POLICY_DOMAIN_CHROME)); 336 EXPECT_TRUE(manager_->IsInitializationComplete(POLICY_DOMAIN_CHROME));
337 } 337 }
338 338
339 } // namespace 339 } // namespace
340 } // namespace policy 340 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698