| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "chrome/browser/ui/cocoa/passwords/account_chooser_view_controller.h" | 5 #import "chrome/browser/ui/cocoa/passwords/account_chooser_view_controller.h" |
| 6 | 6 |
| 7 #include <Carbon/Carbon.h> | 7 #include <Carbon/Carbon.h> |
| 8 | 8 |
| 9 #include "base/mac/scoped_nsobject.h" | 9 #include "base/mac/scoped_nsobject.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | |
| 12 #import "chrome/browser/ui/cocoa/passwords/autosignin_prompt_view_controller.h" | 11 #import "chrome/browser/ui/cocoa/passwords/autosignin_prompt_view_controller.h" |
| 12 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h" |
| 13 #include "chrome/browser/ui/passwords/password_dialog_controller_mock.h" | 13 #include "chrome/browser/ui/passwords/password_dialog_controller_mock.h" |
| 14 #include "components/autofill/core/common/password_form.h" | 14 #include "components/autofill/core/common/password_form.h" |
| 15 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 17 #import "ui/events/test/cocoa_test_event_utils.h" | 17 #import "ui/events/test/cocoa_test_event_utils.h" |
| 18 | 18 |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 constexpr char kDialogTitle[] = "Auto signin"; | 22 constexpr char kDialogTitle[] = "Auto signin"; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 TEST_F(AutoSigninPromptViewControllerTest, CloseOnEsc) { | 108 TEST_F(AutoSigninPromptViewControllerTest, CloseOnEsc) { |
| 109 SetUpAutosigninFirstRun(); | 109 SetUpAutosigninFirstRun(); |
| 110 EXPECT_CALL(*this, OnPerformClose()); | 110 EXPECT_CALL(*this, OnPerformClose()); |
| 111 [[view_controller() view] | 111 [[view_controller() view] |
| 112 performKeyEquivalent:cocoa_test_event_utils::KeyEventWithKeyCode( | 112 performKeyEquivalent:cocoa_test_event_utils::KeyEventWithKeyCode( |
| 113 kVK_Escape, '\e', NSKeyDown, 0)]; | 113 kVK_Escape, '\e', NSKeyDown, 0)]; |
| 114 } | 114 } |
| 115 | 115 |
| 116 } // namespace | 116 } // namespace |
| OLD | NEW |