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

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

Issue 19482020: Set configuration_policy=1 on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed unittest Created 7 years, 5 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
« no previous file with comments | « build/common.gypi ('k') | no next file » | 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/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 16 matching lines...) Expand all
27 namespace policy { 27 namespace policy {
28 28
29 namespace { 29 namespace {
30 30
31 using testing::_; 31 using testing::_;
32 using testing::Lt; 32 using testing::Lt;
33 using testing::Return; 33 using testing::Return;
34 using testing::ReturnRef; 34 using testing::ReturnRef;
35 35
36 // Arbitrary policy names used for testing. 36 // Arbitrary policy names used for testing.
37 const char* const kTestPolicy1 = key::kHomepageIsNewTabPage; 37 const char* const kTestPolicy1 = key::kAlternateErrorPagesEnabled;
38 const char* const kTestPolicy2 = key::kSearchSuggestEnabled; 38 const char* const kTestPolicy2 = key::kSearchSuggestEnabled;
39 39
40 class TestPolicyStatisticsCollector : public PolicyStatisticsCollector { 40 class TestPolicyStatisticsCollector : public PolicyStatisticsCollector {
41 public: 41 public:
42 TestPolicyStatisticsCollector( 42 TestPolicyStatisticsCollector(
43 PolicyService* policy_service, 43 PolicyService* policy_service,
44 PrefService* prefs, 44 PrefService* prefs,
45 const scoped_refptr<base::TaskRunner>& task_runner) 45 const scoped_refptr<base::TaskRunner>& task_runner)
46 : PolicyStatisticsCollector(policy_service, prefs, task_runner) { 46 : PolicyStatisticsCollector(policy_service, prefs, task_runner) {
47 } 47 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 EXPECT_CALL(*policy_statistics_collector_.get(), 170 EXPECT_CALL(*policy_statistics_collector_.get(),
171 RecordPolicyUse(test_policy_id1_)); 171 RecordPolicyUse(test_policy_id1_));
172 EXPECT_CALL(*policy_statistics_collector_.get(), 172 EXPECT_CALL(*policy_statistics_collector_.get(),
173 RecordPolicyUse(test_policy_id2_)); 173 RecordPolicyUse(test_policy_id2_));
174 174
175 policy_statistics_collector_->Initialize(); 175 policy_statistics_collector_->Initialize();
176 EXPECT_EQ(1u, task_runner_->GetPendingTasks().size()); 176 EXPECT_EQ(1u, task_runner_->GetPendingTasks().size());
177 } 177 }
178 178
179 } // namespace policy 179 } // namespace policy
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698