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

Side by Side Diff: components/policy/core/common/policy_statistics_collector_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
« no previous file with comments | « components/policy/core/common/policy_statistics_collector.cc ('k') | components/precache/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <cstring> 5 #include <cstring>
6 #include <string> 6 #include <string>
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/prefs/pref_registry_simple.h"
12 #include "base/prefs/testing_pref_service.h"
13 #include "base/test/test_simple_task_runner.h" 11 #include "base/test/test_simple_task_runner.h"
14 #include "base/values.h" 12 #include "base/values.h"
15 #include "components/policy/core/common/external_data_fetcher.h" 13 #include "components/policy/core/common/external_data_fetcher.h"
16 #include "components/policy/core/common/mock_policy_service.h" 14 #include "components/policy/core/common/mock_policy_service.h"
17 #include "components/policy/core/common/policy_map.h" 15 #include "components/policy/core/common/policy_map.h"
18 #include "components/policy/core/common/policy_pref_names.h" 16 #include "components/policy/core/common/policy_pref_names.h"
19 #include "components/policy/core/common/policy_statistics_collector.h" 17 #include "components/policy/core/common/policy_statistics_collector.h"
20 #include "components/policy/core/common/policy_test_utils.h" 18 #include "components/policy/core/common/policy_test_utils.h"
21 #include "components/policy/core/common/policy_types.h" 19 #include "components/policy/core/common/policy_types.h"
20 #include "components/prefs/pref_registry_simple.h"
21 #include "components/prefs/testing_pref_service.h"
22 #include "testing/gmock/include/gmock/gmock.h" 22 #include "testing/gmock/include/gmock/gmock.h"
23 #include "testing/gtest/include/gtest/gtest.h" 23 #include "testing/gtest/include/gtest/gtest.h"
24 24
25 namespace policy { 25 namespace policy {
26 26
27 namespace { 27 namespace {
28 28
29 using testing::ReturnRef; 29 using testing::ReturnRef;
30 30
31 // Arbitrary policy names used for testing. 31 // Arbitrary policy names used for testing.
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 EXPECT_CALL(*policy_statistics_collector_.get(), 186 EXPECT_CALL(*policy_statistics_collector_.get(),
187 RecordPolicyUse(kTestPolicy1Id)); 187 RecordPolicyUse(kTestPolicy1Id));
188 EXPECT_CALL(*policy_statistics_collector_.get(), 188 EXPECT_CALL(*policy_statistics_collector_.get(),
189 RecordPolicyUse(kTestPolicy2Id)); 189 RecordPolicyUse(kTestPolicy2Id));
190 190
191 policy_statistics_collector_->Initialize(); 191 policy_statistics_collector_->Initialize();
192 EXPECT_EQ(1u, task_runner_->GetPendingTasks().size()); 192 EXPECT_EQ(1u, task_runner_->GetPendingTasks().size());
193 } 193 }
194 194
195 } // namespace policy 195 } // namespace policy
OLDNEW
« no previous file with comments | « components/policy/core/common/policy_statistics_collector.cc ('k') | components/precache/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698