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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/save_card_bubble_view_unittest.mm

Issue 2789843004: [Payments] Upload card UI now has a CVC prompt (Closed)
Patch Set: Addressing code review comments Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include <Carbon/Carbon.h> // For the kVK_* constants. 5 #include <Carbon/Carbon.h> // For the kVK_* constants.
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/ui/autofill/save_card_bubble_controller.h"
12 #import "chrome/browser/ui/cocoa/autofill/save_card_bubble_view_bridge.h" 11 #import "chrome/browser/ui/cocoa/autofill/save_card_bubble_view_bridge.h"
13 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 12 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
14 #include "chrome/browser/ui/cocoa/test/cocoa_profile_test.h" 13 #include "chrome/browser/ui/cocoa/test/cocoa_profile_test.h"
15 #include "components/autofill/core/browser/credit_card.h" 14 #include "components/autofill/core/browser/credit_card.h"
15 #include "components/autofill/core/browser/ui/save_card_bubble_controller.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 namespace autofill { 19 namespace autofill {
20 20
21 namespace { 21 namespace {
22 22
23 class TestSaveCardBubbleController : public SaveCardBubbleController { 23 class TestSaveCardBubbleController : public SaveCardBubbleController {
24 public: 24 public:
25 TestSaveCardBubbleController() { 25 TestSaveCardBubbleController() {
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 208
209 TEST_F(SaveCardBubbleViewTest, EscapeCloses) { 209 TEST_F(SaveCardBubbleViewTest, EscapeCloses) {
210 [[bridge_->view_controller_ window] 210 [[bridge_->view_controller_ window]
211 performKeyEquivalent:cocoa_test_event_utils::KeyEventWithKeyCode( 211 performKeyEquivalent:cocoa_test_event_utils::KeyEventWithKeyCode(
212 kVK_Escape, '\e', NSKeyDown, 0)]; 212 kVK_Escape, '\e', NSKeyDown, 0)];
213 213
214 EXPECT_TRUE(bubble_controller_->on_bubble_closed_was_called()); 214 EXPECT_TRUE(bubble_controller_->on_bubble_closed_was_called());
215 } 215 }
216 216
217 } // namespace autofill 217 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698