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

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: overload 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.h » ('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 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());
+}
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698