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 82ae23f8e3cc140cf109da138c50139e0a9cca92..14e89b18de5b736b4eb0d803dec088057b6a74ca 100644 |
--- a/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc |
+++ b/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc |
@@ -27,6 +27,7 @@ |
#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/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/syncable_prefs/testing_pref_service_syncable.h" |
@@ -163,8 +164,13 @@ TEST_F(ChromePasswordManagerClientTest, |
TEST_F(ChromePasswordManagerClientTest, |
IsAutomaticPasswordSavingEnabledWhenFlagIsSetTest) { |
- base::CommandLine::ForCurrentProcess()->AppendSwitch( |
- password_manager::switches::kEnableAutomaticPasswordSaving); |
+ // 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)); |
+ |
if (chrome::GetChannel() == version_info::Channel::UNKNOWN) |
EXPECT_TRUE(GetClient()->IsAutomaticPasswordSavingEnabled()); |
else |