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

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

Issue 1968463002: Close the account chooser and auto sign-in opt in with ESC on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 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 | « chrome/browser/ui/cocoa/passwords/autosignin_prompt_view_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/passwords/autosignin_prompt_view_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/passwords/autosignin_prompt_view_controller_unittest.mm b/chrome/browser/ui/cocoa/passwords/autosignin_prompt_view_controller_unittest.mm
index 7f6f11237e4bce1812295b09f7f3008f1531f9fb..d62f8daf9abac9a66e2cb9a0b9328d4203bbb099 100644
--- a/chrome/browser/ui/cocoa/passwords/autosignin_prompt_view_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/passwords/autosignin_prompt_view_controller_unittest.mm
@@ -4,6 +4,8 @@
#import "chrome/browser/ui/cocoa/passwords/account_chooser_view_controller.h"
+#include <Carbon/Carbon.h>
+
#include "base/mac/scoped_nsobject.h"
#include "base/strings/utf_string_conversions.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
@@ -12,6 +14,7 @@
#include "components/autofill/core/common/password_form.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+#import "ui/events/test/cocoa_test_event_utils.h"
namespace {
@@ -120,4 +123,12 @@ TEST_F(AutoSigninPromptViewControllerTest, ClosePromptAndHandleClick) {
[view_controller().turnOffButton performClick:nil];
}
+TEST_F(AutoSigninPromptViewControllerTest, CloseOnEsc) {
+ SetUpAutosigninFirstRun();
+ EXPECT_CALL(*this, OnPerformClose());
+ [[view_controller() view]
+ performKeyEquivalent:cocoa_test_event_utils::KeyEventWithKeyCode(
+ kVK_Escape, '\e', NSKeyDown, 0)];
+}
+
} // namespace
« no previous file with comments | « chrome/browser/ui/cocoa/passwords/autosignin_prompt_view_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698