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

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

Issue 512683003: Password bubble should close if user clicks on the web page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a test Created 6 years, 4 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_bubble_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_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
index fead5b75df6406024bf1db44bf5856486bd13f82..2914038063be07620e16eb8c73b93dec1c992a7f 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view_browsertest.cc
+++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view_browsertest.cc
@@ -8,6 +8,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/views/passwords/manage_passwords_view_test.h"
+#include "chrome/test/base/interactive_test_utils.h"
#include "components/password_manager/core/browser/password_manager_metrics_util.h"
#include "components/password_manager/core/browser/stub_password_manager_client.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -159,3 +160,14 @@ IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleViewTest,
samples->GetCount(
metrics_util::MANUAL_MANAGE_PASSWORDS));
}
+
+IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleViewTest, CloseOnClick) {
+ ManagePasswordsBubbleView::ShowBubble(
+ browser()->tab_strip_model()->GetActiveWebContents(),
+ ManagePasswordsBubble::AUTOMATIC);
+ EXPECT_TRUE(ManagePasswordsBubbleView::IsShowing());
+ EXPECT_FALSE(ManagePasswordsBubbleView::manage_password_bubble()->
+ GetFocusManager()->GetFocusedView());
+ ui_test_utils::ClickOnView(browser(), VIEW_ID_TAB_CONTAINER);
+ EXPECT_FALSE(ManagePasswordsBubbleView::IsShowing());
+}
« no previous file with comments | « chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698