Chromium Code Reviews| Index: chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc |
| diff --git a/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc b/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc |
| index 44f7cd77e631dacc40df2f8c7ca7510141e3a55c..ea33547282eda8c9012450f5d423679217eb73f1 100644 |
| --- a/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc |
| +++ b/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc |
| @@ -330,10 +330,16 @@ class ResourcePrefetchPredictorBrowserTest : public InProcessBrowserTest { |
| predictor_ = |
| ResourcePrefetchPredictorFactory::GetForProfile(browser()->profile()); |
| ASSERT_TRUE(predictor_); |
| + // URLs from the test server contain a port number. |
| + ResourcePrefetchPredictor::SetAllowPortInUrlsForTesting(true); |
| EnsurePredictorInitialized(); |
| histogram_tester_.reset(new base::HistogramTester()); |
| } |
| + void TearDownOnMainThread() override { |
| + ResourcePrefetchPredictor::SetAllowPortInUrlsForTesting(false); |
|
droger
2017/03/16 12:02:27
Nit, optional: Could we use ScopedClosureRunner to
|
| + } |
| + |
| void TestLearningAndPrefetching(const GURL& main_frame_url) { |
| // Navigate to |main_frame_url| and check all the expectations. |
| NavigateToURLAndCheckSubresources(main_frame_url); |