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

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: Ready for review. 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 base::Value::CreateBooleanValue(true)); 94 base::Value::CreateBooleanValue(true));
95 } 95 }
96 96
97 const base::TimeDelta update_delay_; 97 const base::TimeDelta update_delay_;
98 98
99 int test_policy_id1_; 99 int test_policy_id1_;
100 int test_policy_id2_; 100 int test_policy_id2_;
101 101
102 base::TimeDelta last_delay_; 102 base::TimeDelta last_delay_;
103 103
104 TestingPrefService prefs_; 104 TestingPrefServiceSimple prefs_;
105 MockPolicyService policy_service_; 105 MockPolicyService policy_service_;
106 PolicyMap policy_map_; 106 PolicyMap policy_map_;
107 107
108 scoped_refptr<TestTaskRunner> task_runner_; 108 scoped_refptr<TestTaskRunner> task_runner_;
109 scoped_ptr<TestPolicyStatisticsCollector> policy_statistics_collector_; 109 scoped_ptr<TestPolicyStatisticsCollector> policy_statistics_collector_;
110 }; 110 };
111 111
112 TEST_F(PolicyStatisticsCollectorTest, CollectPending) { 112 TEST_F(PolicyStatisticsCollectorTest, CollectPending) {
113 SetPolicy(kTestPolicy1); 113 SetPolicy(kTestPolicy1);
114 114
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 RecordPolicyUse(test_policy_id1_)); 161 RecordPolicyUse(test_policy_id1_));
162 EXPECT_CALL(*policy_statistics_collector_.get(), 162 EXPECT_CALL(*policy_statistics_collector_.get(),
163 RecordPolicyUse(test_policy_id2_)); 163 RecordPolicyUse(test_policy_id2_));
164 EXPECT_CALL(*task_runner_, PostDelayedTask(_, _, _)). 164 EXPECT_CALL(*task_runner_, PostDelayedTask(_, _, _)).
165 WillOnce(Return(true)); 165 WillOnce(Return(true));
166 166
167 policy_statistics_collector_->Initialize(); 167 policy_statistics_collector_->Initialize();
168 } 168 }
169 169
170 } // namespace policy 170 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698