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

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

Issue 1488763003: [Password Manager] Switch password manager code to use "base/feature_list.h". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses nit. Created 5 years 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 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

Powered by Google App Engine
This is Rietveld 408576698