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

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

Issue 2955963002: Update Chrome Upstream flow to reflect new UI mocks (Closed)
Patch Set: Put changes behind AutofillUpstreamShowNewUi flag Created 3 years, 4 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"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 void OnLegalMessageLinkClicked(const GURL& url) override { 49 void OnLegalMessageLinkClicked(const GURL& url) override {
50 on_legal_message_was_called_ = true; 50 on_legal_message_was_called_ = true;
51 legal_message_url_ = url.spec(); 51 legal_message_url_ = url.spec();
52 } 52 }
53 void OnBubbleClosed() override { on_bubble_closed_was_called_ = true; } 53 void OnBubbleClosed() override { on_bubble_closed_was_called_ = true; }
54 54
55 const LegalMessageLines& GetLegalMessageLines() const override { 55 const LegalMessageLines& GetLegalMessageLines() const override {
56 return lines_; 56 return lines_;
57 } 57 }
58 58
59 MOCK_METHOD1(SetShowUploadConfirmTitle, void(bool show_upload_confirm_title));
59 MOCK_CONST_METHOD1(InputCvcIsValid, bool(const base::string16& input_text)); 60 MOCK_CONST_METHOD1(InputCvcIsValid, bool(const base::string16& input_text));
60 61
61 // Testing state. 62 // Testing state.
62 bool on_save_button_was_called() { return on_save_button_was_called_; } 63 bool on_save_button_was_called() { return on_save_button_was_called_; }
63 bool on_cancel_button_was_called() { return on_cancel_button_was_called_; } 64 bool on_cancel_button_was_called() { return on_cancel_button_was_called_; }
64 bool on_learn_more_was_called() { return on_learn_more_was_called_; } 65 bool on_learn_more_was_called() { return on_learn_more_was_called_; }
65 bool on_legal_message_was_called() { return on_legal_message_was_called_; } 66 bool on_legal_message_was_called() { return on_legal_message_was_called_; }
66 std::string legal_message_url() { return legal_message_url_; } 67 std::string legal_message_url() { return legal_message_url_; }
67 bool on_bubble_closed_was_called() { return on_bubble_closed_was_called_; } 68 bool on_bubble_closed_was_called() { return on_bubble_closed_was_called_; }
68 69
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 211
211 TEST_F(SaveCardBubbleViewTest, EscapeCloses) { 212 TEST_F(SaveCardBubbleViewTest, EscapeCloses) {
212 [[bridge_->view_controller_ window] 213 [[bridge_->view_controller_ window]
213 performKeyEquivalent:cocoa_test_event_utils::KeyEventWithKeyCode( 214 performKeyEquivalent:cocoa_test_event_utils::KeyEventWithKeyCode(
214 kVK_Escape, '\e', NSKeyDown, 0)]; 215 kVK_Escape, '\e', NSKeyDown, 0)];
215 216
216 EXPECT_TRUE(bubble_controller_->on_bubble_closed_was_called()); 217 EXPECT_TRUE(bubble_controller_->on_bubble_closed_was_called());
217 } 218 }
218 219
219 } // namespace autofill 220 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698