OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "chrome/browser/predictors/loading_stats_collector.h" | 5 #include "chrome/browser/predictors/loading_stats_collector.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/test/histogram_tester.h" | 9 #include "base/test/histogram_tester.h" |
10 #include "chrome/browser/predictors/resource_prefetch_predictor_test_util.h" | 10 #include "chrome/browser/predictors/loading_test_util.h" |
11 #include "chrome/test/base/testing_profile.h" | 11 #include "chrome/test/base/testing_profile.h" |
12 #include "content/public/test/test_browser_thread_bundle.h" | 12 #include "content/public/test/test_browser_thread_bundle.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 | 14 |
15 using testing::_; | 15 using testing::_; |
16 using testing::DoAll; | 16 using testing::DoAll; |
17 using testing::Return; | 17 using testing::Return; |
18 using testing::SetArgPointee; | 18 using testing::SetArgPointee; |
19 using testing::StrictMock; | 19 using testing::StrictMock; |
20 | 20 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 internal::kResourcePrefetchPredictorPrefetchHitsCountCached, 1, 1); | 202 internal::kResourcePrefetchPredictorPrefetchHitsCountCached, 1, 1); |
203 histogram_tester_->ExpectUniqueSample( | 203 histogram_tester_->ExpectUniqueSample( |
204 internal::kResourcePrefetchPredictorPrefetchHitsCountNotCached, 1, 1); | 204 internal::kResourcePrefetchPredictorPrefetchHitsCountNotCached, 1, 1); |
205 histogram_tester_->ExpectUniqueSample( | 205 histogram_tester_->ExpectUniqueSample( |
206 internal::kResourcePrefetchPredictorPrefetchHitsSize, 50, 1); | 206 internal::kResourcePrefetchPredictorPrefetchHitsSize, 50, 1); |
207 histogram_tester_->ExpectUniqueSample( | 207 histogram_tester_->ExpectUniqueSample( |
208 internal::kResourcePrefetchPredictorPrefetchMissesSize, 5, 1); | 208 internal::kResourcePrefetchPredictorPrefetchMissesSize, 5, 1); |
209 } | 209 } |
210 | 210 |
211 } // namespace predictors | 211 } // namespace predictors |
OLD | NEW |