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 4989deb36454a1113af6bb2d56d4b6cb2a112bfe..0a6c46c8bfb39d320a5c95511d3742ca6ccf0a70 100644 |
--- a/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc |
+++ b/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc |
@@ -8,7 +8,6 @@ |
#include <string> |
-#include "base/command_line.h" |
#include "base/macros.h" |
#include "base/metrics/field_trial.h" |
#include "base/strings/string16.h" |
@@ -26,10 +25,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" |
@@ -168,11 +167,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()); |