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

Unified Diff: chrome/browser/ui/cocoa/passwords/passwords_bubble_browsertest.mm

Issue 2018013002: Refresh the password bubble if it's open when the second request comes in. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 7 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 | « no previous file | chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
+}
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698