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

Side by Side Diff: components/policy/core/browser/configuration_policy_pref_store_unittest.cc

Issue 1651203002: Update components for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <string> 5 #include <string>
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/prefs/pref_store_observer_mock.h"
10 #include "base/run_loop.h" 9 #include "base/run_loop.h"
11 #include "components/policy/core/browser/configuration_policy_handler.h" 10 #include "components/policy/core/browser/configuration_policy_handler.h"
12 #include "components/policy/core/browser/configuration_policy_pref_store.h" 11 #include "components/policy/core/browser/configuration_policy_pref_store.h"
13 #include "components/policy/core/browser/configuration_policy_pref_store_test.h" 12 #include "components/policy/core/browser/configuration_policy_pref_store_test.h"
14 #include "components/policy/core/common/external_data_fetcher.h" 13 #include "components/policy/core/common/external_data_fetcher.h"
15 #include "components/policy/core/common/policy_details.h" 14 #include "components/policy/core/common/policy_details.h"
16 #include "components/policy/core/common/policy_map.h" 15 #include "components/policy/core/common/policy_map.h"
17 #include "components/policy/core/common/policy_pref_names.h" 16 #include "components/policy/core/common/policy_pref_names.h"
18 #include "components/policy/core/common/policy_service_impl.h" 17 #include "components/policy/core/common/policy_service_impl.h"
19 #include "components/policy/core/common/policy_types.h" 18 #include "components/policy/core/common/policy_types.h"
19 #include "components/prefs/pref_store_observer_mock.h"
20 #include "testing/gmock/include/gmock/gmock.h" 20 #include "testing/gmock/include/gmock/gmock.h"
21 21
22 // Note: this file should move to components/policy/core/browser, but the 22 // Note: this file should move to components/policy/core/browser, but the
23 // components_unittests runner does not load the ResourceBundle as 23 // components_unittests runner does not load the ResourceBundle as
24 // ChromeTestSuite::Initialize does, which leads to failures using 24 // ChromeTestSuite::Initialize does, which leads to failures using
25 // PolicyErrorMap. 25 // PolicyErrorMap.
26 26
27 using testing::Mock; 27 using testing::Mock;
28 using testing::Return; 28 using testing::Return;
29 using testing::_; 29 using testing::_;
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 .WillRepeatedly(Return(true)); 219 .WillRepeatedly(Return(true));
220 PolicyMap policy; 220 PolicyMap policy;
221 UpdateProviderPolicy(policy); 221 UpdateProviderPolicy(policy);
222 EXPECT_TRUE(observer_.initialized); 222 EXPECT_TRUE(observer_.initialized);
223 EXPECT_TRUE(observer_.initialization_success); 223 EXPECT_TRUE(observer_.initialization_success);
224 Mock::VerifyAndClearExpectations(&observer_); 224 Mock::VerifyAndClearExpectations(&observer_);
225 EXPECT_TRUE(store_->IsInitializationComplete()); 225 EXPECT_TRUE(store_->IsInitializationComplete());
226 } 226 }
227 227
228 } // namespace policy 228 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698