Index: chrome/browser/password_manager/chrome_password_manager_client_unittest.cc |
diff --git a/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc b/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc |
index d1f0ff6fee8a11d864fae8dcde3dbc1e699b9d12..d94838510f851c75085d0e382df7d55bd5b03c14 100644 |
--- a/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc |
+++ b/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc |
@@ -9,7 +9,6 @@ |
#include <string> |
#include <tuple> |
-#include "base/command_line.h" |
#include "base/macros.h" |
#include "base/metrics/field_trial.h" |
#include "base/strings/string16.h" |
@@ -27,10 +26,10 @@ |
#include "components/password_manager/core/browser/log_receiver.h" |
#include "components/password_manager/core/browser/log_router.h" |
#include "components/password_manager/core/browser/password_manager_internals_service.h" |
+#include "components/password_manager/core/browser/password_manager_test_utils.h" |
#include "components/password_manager/core/common/credential_manager_types.h" |
#include "components/password_manager/core/common/password_manager_features.h" |
#include "components/password_manager/core/common/password_manager_pref_names.h" |
-#include "components/password_manager/core/common/password_manager_switches.h" |
#include "components/prefs/pref_registry_simple.h" |
#include "components/prefs/pref_service.h" |
#include "components/prefs/testing_pref_service.h" |
@@ -169,11 +168,13 @@ TEST_F(ChromePasswordManagerClientTest, |
TEST_F(ChromePasswordManagerClientTest, |
IsAutomaticPasswordSavingEnabledWhenFlagIsSetTest) { |
// Add the enable-automatic-password-saving feature. |
- base::FeatureList::ClearInstanceForTesting(); |
scoped_ptr<base::FeatureList> feature_list(new base::FeatureList); |
- feature_list->InitializeFromCommandLine( |
- password_manager::features::kEnableAutomaticPasswordSaving.name, ""); |
- base::FeatureList::SetInstance(std::move(feature_list)); |
+ std::vector<const base::Feature*> enabled_features; |
+ std::vector<const base::Feature*> disabled_features; |
+ enabled_features.push_back( |
+ &password_manager::features::kEnableAutomaticPasswordSaving); |
+ password_manager::SetFeatures(enabled_features, disabled_features, |
+ std::move(feature_list)); |
if (chrome::GetChannel() == version_info::Channel::UNKNOWN) |
EXPECT_TRUE(GetClient()->IsAutomaticPasswordSavingEnabled()); |