Chromium Code Reviews| Index: chrome/browser/ui/views/passwords/manage_passwords_bubble_view_browsertest.cc |
| diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view_browsertest.cc b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view_browsertest.cc |
| index d664a1b488031ba4cf06cce8a7697fee36488718..5434b1370d58f2b8b9f9a5c5716dcf6446bcbee2 100644 |
| --- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view_browsertest.cc |
| +++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view_browsertest.cc |
| @@ -6,6 +6,7 @@ |
| #include "base/command_line.h" |
| #include "base/macros.h" |
| +#include "base/strings/utf_string_conversions.h" |
| #include "chrome/browser/ui/passwords/manage_passwords_test.h" |
| #include "chrome/browser/ui/test/test_browser_dialog.h" |
| #include "ui/base/ui_base_switches.h" |
| @@ -24,6 +25,16 @@ class ManagePasswordsBubbleDialogViewTest |
| } else if (name == "ManagePasswordBubble") { |
| SetupManagingPasswords(); |
| ExecuteManagePasswordsCommand(); |
| + } else if (name == "AutoSignin") { |
| + test_form()->origin = GURL("https://example.com"); |
| + test_form()->display_name = base::ASCIIToUTF16("Peter"); |
| + test_form()->username_value = base::ASCIIToUTF16("pet12@gmail.com"); |
| + std::vector<std::unique_ptr<autofill::PasswordForm>> local_credentials; |
| + local_credentials.push_back( |
| + base::MakeUnique<autofill::PasswordForm>(*test_form())); |
|
Peter Kasting
2017/04/24 22:48:31
Nit: Use = {...} to init-at-definition instead of
kylix_rd
2017/04/25 17:14:07
Due to the use of std::unique_ptr, {...} initializ
|
| + |
| + ManagePasswordsBubbleView::set_auto_signin_toast_timeout(10); |
| + SetupAutoSignin(std::move(local_credentials)); |
| } else { |
| ADD_FAILURE() << "Unknown dialog type"; |
| return; |
| @@ -55,3 +66,8 @@ IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleDialogViewTest, |
| InvokeDialog_ManagePasswordBubble) { |
| RunDialog(); |
| } |
| + |
| +IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleDialogViewTest, |
| + InvokeDialog_AutoSignin) { |
| + RunDialog(); |
| +} |