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

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

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 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 <cstring> 5 #include <cstring>
6 #include <string> 6 #include <string>
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 return task_runner_->GetPendingTasks().front().delay; 102 return task_runner_->GetPendingTasks().front().delay;
103 } 103 }
104 104
105 const base::TimeDelta update_delay_; 105 const base::TimeDelta update_delay_;
106 106
107 int test_policy_id1_; 107 int test_policy_id1_;
108 int test_policy_id2_; 108 int test_policy_id2_;
109 109
110 base::TimeDelta last_delay_; 110 base::TimeDelta last_delay_;
111 111
112 TestingPrefService prefs_; 112 TestingPrefServiceSimple prefs_;
113 MockPolicyService policy_service_; 113 MockPolicyService policy_service_;
114 PolicyMap policy_map_; 114 PolicyMap policy_map_;
115 115
116 scoped_refptr<base::TestSimpleTaskRunner> task_runner_; 116 scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
117 scoped_ptr<TestPolicyStatisticsCollector> policy_statistics_collector_; 117 scoped_ptr<TestPolicyStatisticsCollector> policy_statistics_collector_;
118 }; 118 };
119 119
120 TEST_F(PolicyStatisticsCollectorTest, CollectPending) { 120 TEST_F(PolicyStatisticsCollectorTest, CollectPending) {
121 SetPolicy(kTestPolicy1); 121 SetPolicy(kTestPolicy1);
122 122
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 EXPECT_CALL(*policy_statistics_collector_.get(), 167 EXPECT_CALL(*policy_statistics_collector_.get(),
168 RecordPolicyUse(test_policy_id1_)); 168 RecordPolicyUse(test_policy_id1_));
169 EXPECT_CALL(*policy_statistics_collector_.get(), 169 EXPECT_CALL(*policy_statistics_collector_.get(),
170 RecordPolicyUse(test_policy_id2_)); 170 RecordPolicyUse(test_policy_id2_));
171 171
172 policy_statistics_collector_->Initialize(); 172 policy_statistics_collector_->Initialize();
173 EXPECT_EQ(1u, task_runner_->GetPendingTasks().size()); 173 EXPECT_EQ(1u, task_runner_->GetPendingTasks().size());
174 } 174 }
175 175
176 } // namespace policy 176 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/policy_statistics_collector.cc ('k') | chrome/browser/policy/url_blacklist_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698