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

Unified Diff: content/public/test/browser_test_base.cc

Issue 2887523002: Avoid changing enabled features while the browser is already running.
Patch Set: Created 3 years, 7 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 | « content/browser/frame_host/data_url_navigation_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/browser_test_base.cc
diff --git a/content/public/test/browser_test_base.cc b/content/public/test/browser_test_base.cc
index 9526a3927e82bbcaf0e6bcdea5e131530abbcb63..577bc75e2bdc016a2709754cef60c03d83d4d171 100644
--- a/content/public/test/browser_test_base.cc
+++ b/content/public/test/browser_test_base.cc
@@ -250,6 +250,7 @@ void BrowserTestBase::SetUp() {
// Need to wipe feature list clean, since BrowserMain calls
// FeatureList::SetInstance, which expects no instance to exist.
base::FeatureList::ClearInstanceForTesting();
+ base::FeatureList::BlockOverridingInstanceForTesting(true);
base::Closure* ui_task =
new base::Closure(
@@ -266,6 +267,7 @@ void BrowserTestBase::SetUp() {
EXPECT_EQ(expected_exit_code_, ContentMain(*GetContentMainParams()));
#endif
TearDownInProcessBrowserTestFixture();
+ base::FeatureList::BlockOverridingInstanceForTesting(false);
}
void BrowserTestBase::TearDown() {
« no previous file with comments | « content/browser/frame_host/data_url_navigation_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698