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

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

Issue 2188623007: Fix DCHECK when opening two password bubbles one after another. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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 a7f00010108599f784b528da2934467c6f40c074..ccc293b00f0b84d1b52d0fa6195c62d0603c7787 100644
--- a/chrome/browser/ui/cocoa/passwords/passwords_bubble_browsertest.mm
+++ b/chrome/browser/ui/cocoa/passwords/passwords_bubble_browsertest.mm
@@ -127,3 +127,20 @@ IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleTest, DoubleOpenBubble) {
EXPECT_TRUE(controller());
EXPECT_TRUE(view()->active());
}
+
+IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleTest, DoubleOpenDifferentBubbles) {
+ // Open the autosignin bubble first.
+ DoWithSwizzledNSWindow(^{
+ ScopedVector<autofill::PasswordForm> local_credentials;
+ local_credentials.push_back(new autofill::PasswordForm(*test_form()));
+ SetupAutoSignin(std::move(local_credentials));
+ });
+ EXPECT_TRUE(controller());
+ EXPECT_TRUE(view()->active());
+
+ // Open the save bubble. The previous one is closed twice (with and without
+ // animation). It shouldn't cause DCHECK.
+ DoWithSwizzledNSWindow(^{ SetupPendingPassword(); });
+ EXPECT_TRUE(controller());
+ EXPECT_TRUE(view()->active());
+}

Powered by Google App Engine
This is Rietveld 408576698