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

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

Issue 185413025: Moved policy unittests into the policy component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 9 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
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/policy/configuration_policy_pref_store_test.h"
6
7 #include <string>
8
9 #include "base/run_loop.h"
10 #include "components/policy/core/browser/configuration_policy_pref_store.h"
11 #include "components/policy/core/common/policy_details.h"
12 #include "components/policy/core/common/policy_map.h"
13 #include "components/policy/core/common/policy_service_impl.h"
14 #include "testing/gmock/include/gmock/gmock.h"
15
16 using testing::Return;
17 using testing::_;
18
19 namespace policy {
20
21 ConfigurationPolicyPrefStoreTest::ConfigurationPolicyPrefStoreTest()
22 : handler_list_(GetChromePolicyDetailsCallback()) {
23 EXPECT_CALL(provider_, IsInitializationComplete(_))
24 .WillRepeatedly(Return(false));
25 provider_.Init();
26 providers_.push_back(&provider_);
27 policy_service_.reset(new PolicyServiceImpl(providers_));
28 store_ = new ConfigurationPolicyPrefStore(
29 policy_service_.get(), &handler_list_, POLICY_LEVEL_MANDATORY);
30 }
31
32 ConfigurationPolicyPrefStoreTest::~ConfigurationPolicyPrefStoreTest() {}
33
34 void ConfigurationPolicyPrefStoreTest::TearDown() {
35 provider_.Shutdown();
36 }
37
38 void ConfigurationPolicyPrefStoreTest::UpdateProviderPolicy(
39 const PolicyMap& policy) {
40 provider_.UpdateChromePolicy(policy);
41 base::RunLoop loop;
42 loop.RunUntilIdle();
43 }
44
45 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698