Index: chrome/browser/ui/views/passwords/manage_passwords_bubble_view_interactive_uitest.cc |
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view_interactive_uitest.cc b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view_interactive_uitest.cc |
index eca1739da1fbe83bc6c7905787f4d9c966b95400..738e70c827603515c666d0f16f168bc291c07a69 100644 |
--- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view_interactive_uitest.cc |
+++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view_interactive_uitest.cc |
@@ -7,6 +7,7 @@ |
#include <utility> |
#include "base/command_line.h" |
+#include "base/feature_list.h" |
#include "base/macros.h" |
#include "base/metrics/histogram_samples.h" |
#include "base/strings/utf_string_conversions.h" |
@@ -22,7 +23,7 @@ |
#include "chrome/test/base/interactive_test_utils.h" |
#include "content/public/browser/notification_types.h" |
#include "content/public/browser/render_view_host.h" |
-#include "content/public/common/content_switches.h" |
+#include "content/public/common/content_features.h" |
#include "net/url_request/test_url_fetcher_factory.h" |
#include "testing/gmock/include/gmock/gmock.h" |
@@ -291,9 +292,13 @@ IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleViewTest, TwoTabsWithBubble) { |
} |
IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleViewTest, AutoSignin) { |
- // The switch enables the new UI. |
- base::CommandLine::ForCurrentProcess()->AppendSwitch( |
- switches::kEnableCredentialManagerAPI); |
+ base::FeatureList::ClearInstanceForTesting(); |
+ scoped_ptr<base::FeatureList> feature_list(new base::FeatureList); |
+ feature_list->InitializeFromCommandLine( |
+ features::kCredentialManagementAPI.name, std::string()); |
+ base::FeatureList::SetInstance(std::move(feature_list)); |
+ ASSERT_TRUE(base::FeatureList::IsEnabled(features::kCredentialManagementAPI)); |
+ |
ScopedVector<autofill::PasswordForm> local_credentials; |
test_form()->origin = GURL("https://example.com"); |
test_form()->display_name = base::ASCIIToUTF16("Peter"); |