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

Unified Diff: chrome/browser/password_manager/chrome_password_manager_client_unittest.cc

Issue 1668523002: [Password Manager] Switch password manager code to use the Feature framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes to fieldtrial_testing_config_*.json Created 4 years, 10 months 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/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());

Powered by Google App Engine
This is Rietveld 408576698