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

Unified Diff: chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa_unittest.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 | « chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa_unittest.mm
diff --git a/chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa_unittest.mm b/chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa_unittest.mm
index 918ced6bbac1f93006b6b5bd2179b9dcdd00bd4f..23618c9f6154a3e56ea7a8b97bb4a034878ef15a 100644
--- a/chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa_unittest.mm
+++ b/chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa_unittest.mm
@@ -177,6 +177,17 @@ TEST_F(ManagePasswordsBubbleCocoaTest, HideBubbleOnChangedState) {
EXPECT_FALSE([bubbleWindow() isVisible]);
}
+TEST_F(ManagePasswordsBubbleCocoaTest, ShowBubbleTwice) {
+ ShowBubble(false);
+ base::scoped_nsobject<NSWindow> bubble([bubbleWindow() retain]);
+ // Opening the bubble again should retrieve the data from the UI controller
+ // again.
+ ShowBubble(false);
+ EXPECT_TRUE(ManagePasswordsBubbleCocoa::instance());
+ EXPECT_NSNE(bubble, bubbleWindow());
+ EXPECT_TRUE([bubbleWindow() isVisible]);
+}
+
TEST_F(ManagePasswordsBubbleCocoaTest, OpenWithoutFocus) {
ShowBubble(false);
EXPECT_TRUE(ManagePasswordsBubbleCocoa::instance());
« no previous file with comments | « chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698