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

Unified Diff: chrome/test/base/in_process_browser_test.cc

Issue 2876153002: Support Using ScopedFeatureList in BrowserTest (Closed)
Patch Set: leave tests and changes in test_suites to following patch Created 3 years, 6 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
« no previous file with comments | « chrome/test/base/in_process_browser_test.h ('k') | chrome/test/base/test_launcher_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/in_process_browser_test.cc
diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc
index 27328e5a8c805b6ef71191bfa068f09df975d570..7f4fc2af99c966057100c1e9b29c8181715f7813 100644
--- a/chrome/test/base/in_process_browser_test.cc
+++ b/chrome/test/base/in_process_browser_test.cc
@@ -41,6 +41,7 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_features.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/features.h"
@@ -192,11 +193,6 @@ void InProcessBrowserTest::SetUp() {
// Browser tests will create their own g_browser_process later.
DCHECK(!g_browser_process);
- // Clear the FeatureList instance from base/test/test_suite.cc. Since this is
- // a browser test, a FeatureList will be registered as part of normal browser
- // start up in ChromeBrowserMainParts::SetupMetricsAndFieldTrials().
- base::FeatureList::ClearInstanceForTesting();
-
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
// Auto-reload breaks many browser tests, which assume error pages won't be
@@ -205,6 +201,10 @@ void InProcessBrowserTest::SetUp() {
// here.
command_line->AppendSwitch(switches::kDisableOfflineAutoReload);
+ // Turn off preconnects because they break the brittle python webserver;
+ // see http://crbug.com/60035.
+ scoped_feature_list_.InitAndDisableFeature(features::kNetworkPrediction);
+
// Allow subclasses to change the command line before running any tests.
SetUpCommandLine(command_line);
// Add command line arguments that are used by all InProcessBrowserTests.
« no previous file with comments | « chrome/test/base/in_process_browser_test.h ('k') | chrome/test/base/test_launcher_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698