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 d8e550d12cc6cc2b8998f77fb142209e4bbfd86c..df312aff53cf91d00794779fe83f109823cd14ff 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 |
@@ -7,6 +7,7 @@ |
#include "base/metrics/histogram_samples.h" |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/passwords/manage_passwords_test.h" |
+#include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" |
#include "chrome/browser/ui/tabs/tab_strip_model.h" |
#include "chrome/browser/ui/views/frame/browser_view.h" |
#include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" |
@@ -314,4 +315,18 @@ IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleViewTest, AutoSignin) { |
SetupAutoSignin(local_credentials.Pass()); |
EXPECT_TRUE(ManagePasswordsBubbleView::IsShowing()); |
+ ::testing::Mock::VerifyAndClearExpectations(&url_callback); |
+ |
+ ManagePasswordsBubbleView::CloseBubble(); |
+ EXPECT_FALSE(ManagePasswordsBubbleView::IsShowing()); |
+ content::RunAllPendingInMessageLoop(); |
+ |
+ // Open the bubble to manage accounts. |
+ EXPECT_EQ(password_manager::ui::MANAGE_ACCOUNTS_STATE, |
+ GetController()->state()); |
+ EXPECT_CALL(url_callback, OnRequestDone(avatar_url)); |
+ ManagePasswordsBubbleView::ShowBubble( |
+ browser()->tab_strip_model()->GetActiveWebContents(), |
+ ManagePasswordsBubble::USER_ACTION); |
+ EXPECT_TRUE(ManagePasswordsBubbleView::IsShowing()); |
} |