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

Unified Diff: chrome/browser/browser_about_handler_unittest.cc

Issue 2484613002: Migrate more tests to ScopedFeatureList. (Closed)
Patch Set: rebase Created 4 years, 1 month 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/browser_about_handler_unittest.cc
diff --git a/chrome/browser/browser_about_handler_unittest.cc b/chrome/browser/browser_about_handler_unittest.cc
index 8e439a5fa81ac26ad5bcf7c86cfe4db867a0366e..06f53786126bc307bcdfe20c1fa0583bb4969a52 100644
--- a/chrome/browser/browser_about_handler_unittest.cc
+++ b/chrome/browser/browser_about_handler_unittest.cc
@@ -10,9 +10,9 @@
#include <utility>
#include <vector>
-#include "base/feature_list.h"
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
+#include "base/test/scoped_feature_list.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/testing_profile.h"
@@ -113,11 +113,8 @@ TEST_F(BrowserAboutHandlerTest, WillHandleBrowserAboutURLForOptions) {
#endif
TEST_F(BrowserAboutHandlerTest, WillHandleBrowserAboutURLForMDSettings) {
- std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
- feature_list->InitializeFromCommandLine(
- features::kMaterialDesignSettings.name, "");
- base::FeatureList::ClearInstanceForTesting();
- base::FeatureList::SetInstance(std::move(feature_list));
+ base::test::ScopedFeatureList scoped_feature_list;
+ scoped_feature_list.InitAndEnableFeature(features::kMaterialDesignSettings);
std::string chrome_prefix(content::kChromeUIScheme);
chrome_prefix.append(url::kStandardSchemeSeparator);

Powered by Google App Engine
This is Rietveld 408576698