| 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 b6a65da1dc544a91be8fa6af767ee599c3b224b8..1b623f438e1cff994e468aa377d56055bb9204eb 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
|
| @@ -6,6 +6,8 @@
|
|
|
| #include <utility>
|
|
|
| +#include <Carbon/Carbon.h>
|
| +
|
| #include "base/mac/foundation_util.h"
|
| #include "base/mac/scoped_nsobject.h"
|
| #include "base/strings/string16.h"
|
| @@ -20,6 +22,7 @@
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "testing/gtest_mac.h"
|
| +#import "ui/events/test/cocoa_test_event_utils.h"
|
| #include "url/gurl.h"
|
| #include "url/origin.h"
|
|
|
| @@ -231,4 +234,14 @@ TEST_F(AccountChooserViewControllerTest, ClosePromptAndHandleClick) {
|
| [view_controller().cancelButton performClick:nil];
|
| }
|
|
|
| +TEST_F(AccountChooserViewControllerTest, CloseOnEsc) {
|
| + PasswordDialogController::FormsVector local_forms;
|
| + local_forms.push_back(Credential("pizza"));
|
| + SetUpAccountChooser(&local_forms);
|
| + EXPECT_CALL(*this, OnPerformClose());
|
| + [[view_controller() view]
|
| + performKeyEquivalent:cocoa_test_event_utils::KeyEventWithKeyCode(
|
| + kVK_Escape, '\e', NSKeyDown, 0)];
|
| +}
|
| +
|
| } // namespace
|
|
|