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

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

Issue 1645503002: Remove dangling ManagePasswordsBubbleModel pointers. Test that different password bubbles don't pin… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/account_chooser_view_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/passwords/account_chooser_view_controller_unittest.mm b/chrome/browser/ui/cocoa/passwords/account_chooser_view_controller_unittest.mm
index 667ee3e3bf61b27359f0f8bb9b3bcacbc67d5818..e1534c73a888b561e1860f516cc8abb3b8c846c2 100644
--- a/chrome/browser/ui/cocoa/passwords/account_chooser_view_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/passwords/account_chooser_view_controller_unittest.mm
@@ -212,4 +212,19 @@ TEST_F(AccountChooserViewControllerTest, ClickTitleLink) {
atIndex:0];
}
+TEST_F(AccountChooserViewControllerTest, ClosePromptAndHandleClick) {
+ // A user may press mouse down, some navigation closes the dialog, mouse up
+ // still sends the action. The view should not crash.
+ PasswordDialogController::FormsVector local_forms;
+ local_forms.push_back(Credential("pizza"));
+ SetUpAccountChooser(std::move(local_forms),
+ PasswordDialogController::FormsVector());
+ [view_controller() setBridge:nil];
+ [view_controller().titleView clickedOnLink:@"" atIndex:0];
+ [view_controller().credentialsView
+ selectRowIndexes:[NSIndexSet indexSetWithIndex:0]
+ byExtendingSelection:NO];
+ [view_controller().cancelButton performClick:nil];
+}
+
} // namespace

Powered by Google App Engine
This is Rietveld 408576698