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

Side by Side Diff: components/policy/core/common/cloud/cloud_policy_service_unittest.cc

Issue 109743002: Move policy code into components/policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moar fixes Created 7 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/cloud/cloud_policy_service.h" 5 #include "components/policy/core/common/cloud/cloud_policy_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "chrome/browser/policy/cloud/cloud_policy_constants.h"
10 #include "chrome/browser/policy/cloud/mock_cloud_policy_client.h"
11 #include "chrome/browser/policy/cloud/mock_cloud_policy_store.h"
12 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" 9 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h"
10 #include "components/policy/core/common/cloud/cloud_policy_constants.h"
11 #include "components/policy/core/common/cloud/mock_cloud_policy_client.h"
12 #include "components/policy/core/common/cloud/mock_cloud_policy_store.h"
13 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 namespace em = enterprise_management; 16 namespace em = enterprise_management;
17 17
18 using testing::_; 18 using testing::_;
19 19
20 namespace policy { 20 namespace policy {
21 21
22 class MockCloudPolicyServiceObserver : public CloudPolicyService::Observer { 22 class MockCloudPolicyServiceObserver : public CloudPolicyService::Observer {
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 testing::Mock::VerifyAndClearExpectations(&observer); 231 testing::Mock::VerifyAndClearExpectations(&observer);
232 232
233 // Now, the next time the store is loaded, the observer should not be called 233 // Now, the next time the store is loaded, the observer should not be called
234 // again. 234 // again.
235 EXPECT_CALL(observer, OnInitializationCompleted(&service_)).Times(0); 235 EXPECT_CALL(observer, OnInitializationCompleted(&service_)).Times(0);
236 store_.NotifyStoreLoaded(); 236 store_.NotifyStoreLoaded();
237 service_.RemoveObserver(&observer); 237 service_.RemoveObserver(&observer);
238 } 238 }
239 239
240 } // namespace policy 240 } // namespace policy
OLDNEW
« no previous file with comments | « components/policy/core/common/cloud/cloud_policy_service.cc ('k') | components/policy/core/common/cloud/cloud_policy_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698