| 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 049b679f44007a129d99f3f963c882fe794e2ca9..654b1d565077ad1488a0ca5ad39e109c437553fa 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
|
| @@ -193,11 +193,12 @@ IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleViewTest,
|
| SetupAutomaticPassword();
|
| EXPECT_TRUE(ManagePasswordsBubbleView::IsShowing());
|
| ManagePasswordsBubbleView::CloseBubble();
|
| + content::RunAllPendingInMessageLoop();
|
| // Re-opening should count as manual.
|
| ExecuteManagePasswordsCommand();
|
| EXPECT_TRUE(ManagePasswordsBubbleView::IsShowing());
|
|
|
| - scoped_ptr<base::HistogramSamples> samples(
|
| + scoped_ptr<base::HistogramSamples> samples(
|
| GetSamples(kDisplayDispositionMetric));
|
| EXPECT_EQ(
|
| 1,
|
| @@ -244,6 +245,15 @@ IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleViewTest, CloseOnKey) {
|
| EXPECT_FALSE(ManagePasswordsBubbleView::IsShowing());
|
| }
|
|
|
| +IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleViewTest, CloseOnChangedState) {
|
| + SetupPendingPassword();
|
| + EXPECT_TRUE(ManagePasswordsBubbleView::IsShowing());
|
| + // User navigated very fast and landed on another page with an autofilled
|
| + // password. The save password bubble should disappear.
|
| + SetupManagingPasswords();
|
| + EXPECT_FALSE(ManagePasswordsBubbleView::IsShowing());
|
| +}
|
| +
|
| IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleViewTest, TwoTabsWithBubble) {
|
| // Set up the first tab with the bubble.
|
| SetupPendingPassword();
|
|
|