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

Unified Diff: chrome/browser/password_manager/password_manager_browsertest.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/password_manager/password_manager_browsertest.cc
diff --git a/chrome/browser/password_manager/password_manager_browsertest.cc b/chrome/browser/password_manager/password_manager_browsertest.cc
index 5d48868481ae5afdd2e0a908567924709c243135..b53a42f2174f71d7671c5c416405cdeb91a9df4d 100644
--- a/chrome/browser/password_manager/password_manager_browsertest.cc
+++ b/chrome/browser/password_manager/password_manager_browsertest.cc
@@ -15,6 +15,7 @@
#include "base/stl_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/password_manager/chrome_password_manager_client.h"
@@ -1196,11 +1197,9 @@ IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase,
NavigateToFile("/password/password_form.html");
// Add the enable-automatic-password-saving feature.
- base::FeatureList::ClearInstanceForTesting();
- std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
- feature_list->InitializeFromCommandLine(
- password_manager::features::kEnableAutomaticPasswordSaving.name, "");
- base::FeatureList::SetInstance(std::move(feature_list));
+ base::test::ScopedFeatureList scoped_feature_list;
+ scoped_feature_list.InitAndEnableFeature(
+ password_manager::features::kEnableAutomaticPasswordSaving);
// Fill a form and submit through a <input type="submit"> button.
NavigationObserver observer(WebContents());

Powered by Google App Engine
This is Rietveld 408576698