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()); |
+} |