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_predictor.h" | 5 #include "chrome/browser/predictors/loading_predictor.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
14 #include "base/test/histogram_tester.h" | 14 #include "base/test/histogram_tester.h" |
15 #include "chrome/browser/predictors/resource_prefetch_predictor_test_util.h" | 15 #include "chrome/browser/predictors/loading_test_util.h" |
16 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
17 #include "content/public/test/test_browser_thread_bundle.h" | 17 #include "content/public/test/test_browser_thread_bundle.h" |
18 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 using testing::_; | 21 using testing::_; |
22 using testing::Return; | 22 using testing::Return; |
23 using testing::StrictMock; | 23 using testing::StrictMock; |
24 | 24 |
25 namespace predictors { | 25 namespace predictors { |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 EXPECT_EQ(start_time, it->second); | 201 EXPECT_EQ(start_time, it->second); |
202 } | 202 } |
203 | 203 |
204 TEST_F(LoadingPredictorTest, TestDontTrackNonPrefetchableUrls) { | 204 TEST_F(LoadingPredictorTest, TestDontTrackNonPrefetchableUrls) { |
205 const GURL url3 = GURL(kUrl3); | 205 const GURL url3 = GURL(kUrl3); |
206 predictor_->PrepareForPageLoad(url3, HintOrigin::EXTERNAL); | 206 predictor_->PrepareForPageLoad(url3, HintOrigin::EXTERNAL); |
207 EXPECT_TRUE(predictor_->active_hints_.empty()); | 207 EXPECT_TRUE(predictor_->active_hints_.empty()); |
208 } | 208 } |
209 | 209 |
210 } // namespace predictors | 210 } // namespace predictors |
OLD | NEW |