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

Unified Diff: chrome/browser/supervised_user/supervised_user_service_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/supervised_user/supervised_user_service_unittest.cc
diff --git a/chrome/browser/supervised_user/supervised_user_service_unittest.cc b/chrome/browser/supervised_user/supervised_user_service_unittest.cc
index 5be56ec5f01caf0a28c58f76bfe8041073cec216..c17e938a0ee303579de1eacd7ff014191fdff1f5 100644
--- a/chrome/browser/supervised_user/supervised_user_service_unittest.cc
+++ b/chrome/browser/supervised_user/supervised_user_service_unittest.cc
@@ -13,6 +13,7 @@
#include "base/memory/ptr_util.h"
#include "base/path_service.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/test/scoped_feature_list.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "chrome/browser/chrome_notification_types.h"
@@ -448,14 +449,13 @@ class SupervisedUserServiceExtensionTest
protected:
void InitSupervisedUserInitiatedExtensionInstallFeature(bool enabled) {
- base::FeatureList::ClearInstanceForTesting();
- std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
if (enabled) {
- feature_list->InitializeFromCommandLine(
- "SupervisedUserInitiatedExtensionInstall", std::string());
+ scoped_feature_list_.InitAndEnableFeature(
+ supervised_users::kSupervisedUserInitiatedExtensionInstall);
}
- base::FeatureList::SetInstance(std::move(feature_list));
}
+
+ base::test::ScopedFeatureList scoped_feature_list_;
};
TEST_F(SupervisedUserServiceExtensionTest,

Powered by Google App Engine
This is Rietveld 408576698