Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Unified Diff: chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc

Issue 2749583003: predictors: Don't record URLs with a port. (Closed)
Patch Set: Add a comment. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698