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

Unified Diff: components/password_manager/core/browser/password_manager_test_utils.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: Fixes mac bot breakages. 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: components/password_manager/core/browser/password_manager_test_utils.cc
diff --git a/components/password_manager/core/browser/password_manager_test_utils.cc b/components/password_manager/core/browser/password_manager_test_utils.cc
index 170be56505156412d43fec90ad7b9cc53c2cdcb0..12ceef07551bc9f78b21822a7f2c69ee8c3de63b 100644
--- a/components/password_manager/core/browser/password_manager_test_utils.cc
+++ b/components/password_manager/core/browser/password_manager_test_utils.cc
@@ -8,6 +8,7 @@
#include <ostream>
#include <string>
+#include "base/feature_list.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -95,6 +96,13 @@ bool ContainsEqualPasswordFormsUnordered(
return !had_mismatched_actual_form && remaining_expectations.empty();
}
+void EnableFeature(const char* feature) {
Bernhard Bauer 2016/02/09 15:10:33 Why does this take a char* instead of a Feature?
Pritam Nikam 2016/02/09 16:05:54 base::FeatureList::InitializeFromCommandLine() acc
Bernhard Bauer 2016/02/09 16:13:31 Yes, but you could still take a Feature here and e
Pritam Nikam 2016/02/11 10:51:58 Done.
+ base::FeatureList::ClearInstanceForTesting();
+ scoped_ptr<base::FeatureList> feature_list(new base::FeatureList);
+ feature_list->InitializeFromCommandLine(feature, "");
+ base::FeatureList::SetInstance(std::move(feature_list));
+}
+
MockPasswordStoreObserver::MockPasswordStoreObserver() {}
MockPasswordStoreObserver::~MockPasswordStoreObserver() {}

Powered by Google App Engine
This is Rietveld 408576698