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