| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/resource_prefetcher.h" | 5 #include "chrome/browser/predictors/resource_prefetcher.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <utility> | 11 #include <utility> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
| 16 #include "base/test/histogram_tester.h" | 16 #include "base/test/histogram_tester.h" |
| 17 #include "chrome/browser/predictors/resource_prefetch_predictor_test_util.h" | 17 #include "chrome/browser/predictors/loading_test_util.h" |
| 18 #include "chrome/browser/predictors/resource_prefetcher_manager.h" | 18 #include "chrome/browser/predictors/resource_prefetcher_manager.h" |
| 19 #include "chrome/test/base/testing_profile.h" | 19 #include "chrome/test/base/testing_profile.h" |
| 20 #include "content/public/test/test_browser_thread.h" | 20 #include "content/public/test/test_browser_thread.h" |
| 21 #include "net/base/load_flags.h" | 21 #include "net/base/load_flags.h" |
| 22 #include "net/url_request/redirect_info.h" | 22 #include "net/url_request/redirect_info.h" |
| 23 #include "net/url_request/url_request.h" | 23 #include "net/url_request/url_request.h" |
| 24 #include "net/url_request/url_request_test_util.h" | 24 #include "net/url_request/url_request_test_util.h" |
| 25 #include "testing/gmock/include/gmock/gmock.h" | 25 #include "testing/gmock/include/gmock/gmock.h" |
| 26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
| 27 | 27 |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 | 366 |
| 367 OnResponse(https_resource); | 367 OnResponse(https_resource); |
| 368 OnResponse(http_resource); | 368 OnResponse(http_resource); |
| 369 | 369 |
| 370 // Expect the final call. | 370 // Expect the final call. |
| 371 EXPECT_TRUE( | 371 EXPECT_TRUE( |
| 372 prefetcher_delegate_.ResourcePrefetcherFinishedCalled(prefetcher_.get())); | 372 prefetcher_delegate_.ResourcePrefetcherFinishedCalled(prefetcher_.get())); |
| 373 } | 373 } |
| 374 | 374 |
| 375 } // namespace predictors | 375 } // namespace predictors |
| OLD | NEW |