| Index: chrome/browser/ui/cocoa/passwords/passwords_bubble_browsertest.mm
|
| diff --git a/chrome/browser/ui/cocoa/passwords/passwords_bubble_browsertest.mm b/chrome/browser/ui/cocoa/passwords/passwords_bubble_browsertest.mm
|
| index f9a02b5fa2c33346d85f0f5a4537381f21ccd2e0..a7f00010108599f784b528da2934467c6f40c074 100644
|
| --- a/chrome/browser/ui/cocoa/passwords/passwords_bubble_browsertest.mm
|
| +++ b/chrome/browser/ui/cocoa/passwords/passwords_bubble_browsertest.mm
|
| @@ -112,3 +112,18 @@ IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleTest, TabChangeTogglesIcon) {
|
| browser()->tab_strip_model()->ActivateTabAt(firstTab, true);
|
| EXPECT_TRUE(decoration()->IsVisible());
|
| }
|
| +
|
| +IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleTest, DoubleOpenBubble) {
|
| + // Open the bubble first.
|
| + DoWithSwizzledNSWindow(^{ SetupPendingPassword(); });
|
| + base::scoped_nsobject<ManagePasswordsBubbleController> bubble_controller(
|
| + [controller() retain]);
|
| + EXPECT_TRUE(bubble_controller);
|
| + EXPECT_TRUE(view()->active());
|
| +
|
| + // Open the bubble again, the first one should be replaced.
|
| + DoWithSwizzledNSWindow(^{ SetupPendingPassword(); });
|
| + EXPECT_NSNE(bubble_controller, controller());
|
| + EXPECT_TRUE(controller());
|
| + EXPECT_TRUE(view()->active());
|
| +}
|
|
|