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 |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6a4b5c8d1ca70c64ee871cfd92c9db6d5398b5e9 |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view_browsertest.cc |
| @@ -0,0 +1,54 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" |
| + |
| +#include "base/macros.h" |
| +#include "chrome/browser/ui/passwords/manage_passwords_test.h" |
| +#include "chrome/browser/ui/test/test_browser_dialog.h" |
| +#include "chrome/browser/ui/views/frame/browser_view.h" |
|
tapted
2017/04/19 00:25:03
I think some of these can be removed (this line an
kylix_rd
2017/04/19 14:55:37
Done.
|
| +#include "chrome/browser/ui/views/passwords/manage_passwords_icon_views.h" |
| +#include "chrome/browser/ui/views/toolbar/toolbar_view.h" |
| + |
| +class ManagePasswordsBubbleDialogViewTest |
| + : public SupportsTestDialog<ManagePasswordsTest> { |
| + public: |
| + ManagePasswordsBubbleDialogViewTest() {} |
| + ~ManagePasswordsBubbleDialogViewTest() override {} |
| + |
| + // Remove once https://codereview.chromium.org/2818383004/ lands |
|
tapted
2017/04/19 00:25:03
in the CQ now... :)
kylix_rd
2017/04/19 14:55:37
Done.
|
| + ManagePasswordsIconView* view() override { return nullptr; } |
| + |
| + 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; |
| + } |
| + } |
| + |
| + 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(); |
| +} |