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

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

Issue 394403003: Close the password bubble on the icon click. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename the getter Created 6 years, 5 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
« no previous file with comments | « chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
index 4338aaaef30f4e2c7fdde9976669827ab19c82ce..bcaa0180eb78b2459286f0fd1ac40a03cc4e732e 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_icon_view_browsertest.cc
+++ b/chrome/browser/ui/views/passwords/manage_passwords_icon_view_browsertest.cc
@@ -8,6 +8,7 @@
#include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h"
#include "chrome/browser/ui/views/passwords/manage_passwords_view_test.h"
#include "components/password_manager/core/common/password_manager_ui.h"
+#include "content/public/test/test_utils.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -59,3 +60,16 @@ IN_PROC_BROWSER_TEST_F(ManagePasswordsIconViewTest, BlacklistedState) {
view()->SetActive(false);
EXPECT_EQ(IDR_SAVE_PASSWORD_DISABLED_INACTIVE, view()->icon_id());
}
+
+IN_PROC_BROWSER_TEST_F(ManagePasswordsIconViewTest, CloseOnClick) {
+ SetupPendingPassword();
+ EXPECT_TRUE(view()->visible());
+ EXPECT_TRUE(view()->active());
+ ui::MouseEvent mouse_down(ui::ET_MOUSE_PRESSED,
+ gfx::Point(10, 10), gfx::Point(900, 60),
+ ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
+ static_cast<views::View*>(view())->OnMousePressed(mouse_down);
+ // Wait for the command execution to close the bubble.
+ content::RunAllPendingInMessageLoop();
+ EXPECT_FALSE(view()->active());
+}
« no previous file with comments | « chrome/browser/ui/views/passwords/manage_passwords_icon_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698