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

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

Issue 246393004: Password bubble: Introduce a command to open the bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: The bigger picture. Created 6 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_icon_view_browsertest.cc
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_icon_view_browsertest.cc b/chrome/browser/ui/views/passwords/manage_passwords_icon_view_browsertest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a67e94b517b394cf739c1d145454bc4637426285
--- /dev/null
+++ b/chrome/browser/ui/views/passwords/manage_passwords_icon_view_browsertest.cc
@@ -0,0 +1,29 @@
+// Copyright 2014 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_icon_view.h"
+
+#include "chrome/browser/ui/passwords/manage_passwords_bubble_ui_controller_mock.h"
+#include "chrome/browser/ui/passwords/manage_passwords_icon.h"
+#include "chrome/browser/ui/views/passwords/manage_passwords_view_test.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+typedef ManagePasswordsViewTest ManagePasswordsIconViewTest;
+
+IN_PROC_BROWSER_TEST_F(ManagePasswordsIconViewTest, InactiveIsInvisible) {
Peter Kasting 2014/04/25 22:12:02 Nit: Inactive -> Default?
Mike West 2014/04/28 10:52:56 Done.
+ EXPECT_EQ(ManagePasswordsIcon::INACTIVE_STATE, view()->state());
+ EXPECT_FALSE(view()->visible());
+}
+
+IN_PROC_BROWSER_TEST_F(ManagePasswordsIconViewTest, PendingIsVisible) {
+ SetupPendingPassword();
+ EXPECT_EQ(ManagePasswordsIcon::PENDING_STATE, view()->state());
+ EXPECT_TRUE(view()->visible());
+}
+
+IN_PROC_BROWSER_TEST_F(ManagePasswordsIconViewTest, BlacklistedIsVisible) {
+ SetupPendingPassword();
+ EXPECT_EQ(ManagePasswordsIcon::PENDING_STATE, view()->state());
+ EXPECT_TRUE(view()->visible());
+}

Powered by Google App Engine
This is Rietveld 408576698