OLD | NEW |
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" |
| 11 #include "base/prefs/testing_pref_service.h" |
11 #include "base/test/test_simple_task_runner.h" | 12 #include "base/test/test_simple_task_runner.h" |
12 #include "base/time.h" | 13 #include "base/time.h" |
13 #include "base/values.h" | 14 #include "base/values.h" |
14 #include "chrome/browser/policy/mock_policy_service.h" | 15 #include "chrome/browser/policy/mock_policy_service.h" |
15 #include "chrome/browser/policy/policy_map.h" | 16 #include "chrome/browser/policy/policy_map.h" |
16 #include "chrome/browser/policy/policy_statistics_collector.h" | 17 #include "chrome/browser/policy/policy_statistics_collector.h" |
17 #include "chrome/browser/policy/policy_types.h" | 18 #include "chrome/browser/policy/policy_types.h" |
18 #include "chrome/browser/prefs/browser_prefs.h" | 19 #include "chrome/browser/prefs/browser_prefs.h" |
19 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
20 #include "chrome/test/base/testing_pref_service.h" | |
21 #include "policy/policy_constants.h" | 21 #include "policy/policy_constants.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::_; | 29 using testing::_; |
30 using testing::Lt; | 30 using testing::Lt; |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 EXPECT_CALL(*policy_statistics_collector_.get(), | 168 EXPECT_CALL(*policy_statistics_collector_.get(), |
169 RecordPolicyUse(test_policy_id1_)); | 169 RecordPolicyUse(test_policy_id1_)); |
170 EXPECT_CALL(*policy_statistics_collector_.get(), | 170 EXPECT_CALL(*policy_statistics_collector_.get(), |
171 RecordPolicyUse(test_policy_id2_)); | 171 RecordPolicyUse(test_policy_id2_)); |
172 | 172 |
173 policy_statistics_collector_->Initialize(); | 173 policy_statistics_collector_->Initialize(); |
174 EXPECT_EQ(1u, task_runner_->GetPendingTasks().size()); | 174 EXPECT_EQ(1u, task_runner_->GetPendingTasks().size()); |
175 } | 175 } |
176 | 176 |
177 } // namespace policy | 177 } // namespace policy |
OLD | NEW |