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

Unified Diff: components/password_manager/core/browser/password_form_manager_unittest.cc

Issue 2226063002: Add a ScopedFeatureList class for testing and start using it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix issue in previous patchset. Created 4 years, 4 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_form_manager_unittest.cc
diff --git a/components/password_manager/core/browser/password_form_manager_unittest.cc b/components/password_manager/core/browser/password_form_manager_unittest.cc
index b294ad38ca682431fa2fede85b230a75e3c20295..54a021a87ffd905c78a88be18172a6e163d742ff 100644
--- a/components/password_manager/core/browser/password_form_manager_unittest.cc
+++ b/components/password_manager/core/browser/password_form_manager_unittest.cc
@@ -14,6 +14,7 @@
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/histogram_tester.h"
+#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "components/autofill/core/browser/autofill_manager.h"
#include "components/autofill/core/browser/proto/server.pb.h"
@@ -765,16 +766,11 @@ class PasswordFormManagerTest : public testing::Test {
class PasswordFormManagerFillOnAccountSelectTest
: public PasswordFormManagerTest {
public:
- PasswordFormManagerFillOnAccountSelectTest() {}
-
- void SetUp() override {
- std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
- std::vector<const base::Feature*> enabled_features;
- std::vector<const base::Feature*> disabled_features;
- enabled_features.push_back(&features::kFillOnAccountSelect);
- SetFeatures(enabled_features, disabled_features, std::move(feature_list));
- PasswordFormManagerTest::SetUp();
+ PasswordFormManagerFillOnAccountSelectTest() {
+ scoped_feature_list_.InitAndEnableFeature(features::kFillOnAccountSelect);
}
+
+ base::test::ScopedFeatureList scoped_feature_list_;
};
TEST_F(PasswordFormManagerTest, TestNewLogin) {

Powered by Google App Engine
This is Rietveld 408576698