Commit 4f6ea044 authored by Ryan Sturm's avatar Ryan Sturm Committed by Commit Bot

Disabling search engine preconnects in browser tests by default

This caused a suite of tests to fail based on multiple test objects
mocking servers that don't expect extra connections. Rather than fixing
various test fixtures, we disable the search engine preconnect
behavior by default since it has good test coverage by itself. By
disabling the test in the constructor of in process browser test,
any sub tests should be able to override the behavior with their own
feature list.

Also re-enables test that was recently disabled.

Bug: 1128033
Change-Id: I998b4d0f801cf7d8aecde3a68be2f19f7f51cc12
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2494609Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Commit-Queue: Ryan Sturm <ryansturm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821242}
parent 82c6f1b6
...@@ -132,8 +132,7 @@ IN_PROC_BROWSER_TEST_F(LoadTimingBrowserTest, HTTP) { ...@@ -132,8 +132,7 @@ IN_PROC_BROWSER_TEST_F(LoadTimingBrowserTest, HTTP) {
EXPECT_EQ(navigation_deltas.ssl_start, -1); EXPECT_EQ(navigation_deltas.ssl_start, -1);
} }
// TODO(crbug.com/1128033): flaky. IN_PROC_BROWSER_TEST_F(LoadTimingBrowserTest, HTTPS) {
IN_PROC_BROWSER_TEST_F(LoadTimingBrowserTest, DISABLED_HTTPS) {
net::EmbeddedTestServer https_server(net::EmbeddedTestServer::TYPE_HTTPS); net::EmbeddedTestServer https_server(net::EmbeddedTestServer::TYPE_HTTPS);
https_server.AddDefaultHandlers(); https_server.AddDefaultHandlers();
ASSERT_TRUE(https_server.Start()); ASSERT_TRUE(https_server.Start());
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "chrome/browser/devtools/devtools_window.h" #include "chrome/browser/devtools/devtools_window.h"
#include "chrome/browser/lifetime/application_lifetime.h" #include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/lifetime/termination_notification.h" #include "chrome/browser/lifetime/termination_notification.h"
#include "chrome/browser/navigation_predictor/search_engine_preconnector.h"
#include "chrome/browser/net/chrome_network_delegate.h" #include "chrome/browser/net/chrome_network_delegate.h"
#include "chrome/browser/net/net_error_tab_helper.h" #include "chrome/browser/net/net_error_tab_helper.h"
#include "chrome/browser/predictors/loading_predictor_config.h" #include "chrome/browser/predictors/loading_predictor_config.h"
...@@ -220,6 +221,10 @@ void InProcessBrowserTest::Initialize() { ...@@ -220,6 +221,10 @@ void InProcessBrowserTest::Initialize() {
#if defined(OS_MAC) #if defined(OS_MAC)
bundle_swizzler_ = std::make_unique<ScopedBundleSwizzlerMac>(); bundle_swizzler_ = std::make_unique<ScopedBundleSwizzlerMac>();
#endif #endif
// Preconnecting can cause non-deterministic test behavior especially with
// various test fixtures that mock servers.
scoped_feature_list_.InitAndDisableFeature(features::kPreconnectToSearch);
} }
InProcessBrowserTest::~InProcessBrowserTest() = default; InProcessBrowserTest::~InProcessBrowserTest() = default;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment