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()); |