Chromium Code Reviews| 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 6baa1e945acc0fdc4910e921f6d1e19a392be9db..f16ef87339828ec93fe7669b8960c15197c81237 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 |
| @@ -17,6 +17,7 @@ |
| #include "chrome/browser/ui/passwords/manage_passwords_test.h" |
| #include "chrome/browser/ui/passwords/passwords_model_delegate.h" |
| #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| +#include "chrome/browser/ui/test/test_browser_dialog.h" |
| #include "chrome/browser/ui/views/frame/browser_view.h" |
| #include "chrome/browser/ui/views/passwords/manage_passwords_icon_views.h" |
| #include "chrome/browser/ui/views/toolbar/toolbar_view.h" |
| @@ -352,3 +353,43 @@ IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleViewTest, AutoSigninNoFocus) { |
| active_waiter.Wait(); |
| EXPECT_FALSE(IsBubbleShowing()); |
| } |
| + |
| +class ManagePasswordsBubbleDialogViewTest |
| + : public SupportsTestDialog<ManagePasswordsBubbleViewTest> { |
|
tapted
2017/04/18 05:26:34
Note this file isn't compiled on Mac (but will be
kylix_rd
2017/04/18 16:05:16
I've created a new *_browsertest.cc which only con
|
| + public: |
| + ManagePasswordsBubbleDialogViewTest() {} |
| + ~ManagePasswordsBubbleDialogViewTest() override {} |
| + |
| + void ShowDialog(const std::string& name) override { |
| + if (name == "PendingPasswordBubble") { |
| + SetupPendingPassword(); |
| + } else if (name == "AutomaticPasswordBubble") { |
| + SetupAutomaticPassword(); |
| + } else if (name == "ManagePasswordBubble") { |
| + SetupManagingPasswords(); |
| + ExecuteManagePasswordsCommand(); |
| + } else { |
| + ADD_FAILURE() << "Unknown dialog type"; |
| + return; |
| + } |
| + EXPECT_TRUE(IsBubbleShowing()); |
|
tapted
2017/04/18 05:26:34
I wouldn't bother copying the implementation of th
kylix_rd
2017/04/18 16:05:16
Acknowledged.
|
| + } |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleDialogViewTest); |
| +}; |
| + |
| +IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleDialogViewTest, |
| + InvokeDialog_PendingPasswordBubble) { |
| + RunDialog(); |
| +} |
| + |
| +IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleDialogViewTest, |
| + InvokeDialog_AutomaticPasswordBubble) { |
| + RunDialog(); |
| +} |
| + |
| +IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleDialogViewTest, |
| + InvokeDialog_ManagePasswordBubble) { |
| + RunDialog(); |
| +} |