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

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

Issue 565673002: Close the password bubble when navigating between tabs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Android Created 6 years, 3 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 3cc9e7aec481c27a7bca7b2d86bdeae5da34afc2..9aa2aa837db3ac4449918c08789e832c9084530f 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
@@ -271,3 +271,21 @@ IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleViewTest, FadeOnKey) {
false, false, false, false));
EXPECT_TRUE(key_observer.was_called());
}
+
+IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleViewTest, TwoTabsWithBubble) {
+ // Set up the first tab with the bubble.
+ SetupPendingPassword();
+ EXPECT_TRUE(ManagePasswordsBubbleView::IsShowing());
+ // Set up the second tab.
+ AddTabAtIndex(0, GURL("chrome://newtab"), content::PAGE_TRANSITION_TYPED);
+ EXPECT_FALSE(ManagePasswordsBubbleView::IsShowing());
+ ManagePasswordsBubbleView::ShowBubble(
+ browser()->tab_strip_model()->GetActiveWebContents(),
+ ManagePasswordsBubble::AUTOMATIC);
+ EXPECT_TRUE(ManagePasswordsBubbleView::IsShowing());
+ TabStripModel* tab_model = browser()->tab_strip_model();
+ EXPECT_EQ(0, tab_model->active_index());
+ // Back to the first tab.
+ tab_model->ActivateTabAt(1, true);
+ 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