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

Unified Diff: base/test/test_suite.cc

Issue 2876153002: Support Using ScopedFeatureList in BrowserTest (Closed)
Patch Set: add test and init FeatureList with command line in TestSuite::Initialize 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
Index: base/test/test_suite.cc
diff --git a/base/test/test_suite.cc b/base/test/test_suite.cc
index c9bfe9e0f0173558f90130aead0fabe5b8370864..ed0cedbca3ced030bef1be6bac9d96d4575eb804 100644
--- a/base/test/test_suite.cc
+++ b/base/test/test_suite.cc
@@ -342,13 +342,14 @@ void TestSuite::Initialize() {
debug::WaitForDebugger(60, true);
}
#endif
-
// Set up a FeatureList instance, so that code using that API will not hit a
// an error that it's not set. If a FeatureList was created in this way (i.e.
// one didn't exist previously), it will be cleared in Shutdown() via
// ClearInstanceForTesting().
- created_feature_list_ =
- FeatureList::InitializeInstance(std::string(), std::string());
+ created_feature_list_ = FeatureList::InitializeInstance(
Ilya Sherman 2017/05/25 22:48:12 Could you use a ScopedFeatureList here?
+ CommandLine::ForCurrentProcess()->GetSwitchValueASCII("enable-features"),
+ CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ "disable-features"));
Ilya Sherman 2017/05/25 22:48:12 It looks like the code expects that sometimes this
Ilya Sherman 2017/05/25 22:48:12 nit: Please move the kEnabledFeatures and kDisable
#if defined(OS_IOS)
InitIOSTestMessageLoop();

Powered by Google App Engine
This is Rietveld 408576698