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

Unified Diff: chrome/browser/ui/views/passwords/manage_passwords_bubble_view_browsertest.cc

Issue 2819633002: Restored Pre-Harmony Bubble title margin metrics (Closed)
Patch Set: Added SessionCrashedBubbleViewTest for bug 705907 Created 3 years, 8 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: 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();
+}

Powered by Google App Engine
This is Rietveld 408576698