Fix Mac password bubble crash due to the "nope" menu hanging around.
By default open menus in Cocoa exist until the user makes a choice, but since the bubble and its backing controller are owned and managed by cross-platform code, this model doesn't make sense. Hiding the menu programmatically matches the Views implementation and fixes the crash. Since triggering the NSPopUpButton's menu with |performClick:| spins a run loop waiting for user input, getting a test working was extremely difficult. The solution is to refactor BubbleCombobox to subclass MenuButton instead of NSPopUpButton; http://crbug.com/415088 created to track this work, which will then support a test for this bug. BUG=413267 Review URL: https://codereview.chromium.org/563093003 Cr-Commit-Position: refs/heads/master@{#296398}
Showing
Please register or sign in to comment