OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_UI_MOCK_SAVE_CARD_BUBBLE_CONTROLLER_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_UI_MOCK_SAVE_CARD_BUBBLE_CONTROLLER_H_ |
| 7 |
| 8 #include "components/autofill/core/browser/credit_card.h" |
| 9 #include "components/autofill/core/browser/ui/save_card_bubble_controller.h" |
| 10 #include "testing/gmock/include/gmock/gmock.h" |
| 11 |
| 12 namespace autofill { |
| 13 |
| 14 class MockSaveCardBubbleController : public SaveCardBubbleController { |
| 15 public: |
| 16 MockSaveCardBubbleController(); |
| 17 ~MockSaveCardBubbleController() override; |
| 18 |
| 19 MOCK_CONST_METHOD0(GetWindowTitle, base::string16()); |
| 20 MOCK_CONST_METHOD0(GetExplanatoryMessage, base::string16()); |
| 21 MOCK_CONST_METHOD0(GetCard, const CreditCard()); |
| 22 MOCK_CONST_METHOD0(GetCvcImageResourceId, int()); |
| 23 MOCK_CONST_METHOD0(ShouldRequestCvcFromUser, bool()); |
| 24 MOCK_METHOD0(OnCancelButton, void()); |
| 25 MOCK_METHOD0(OnLearnMoreClicked, void()); |
| 26 MOCK_METHOD1(OnLegalMessageLinkClicked, void(const GURL& url)); |
| 27 MOCK_METHOD0(OnBubbleClosed, void()); |
| 28 MOCK_CONST_METHOD0(GetLegalMessageLines, const LegalMessageLines&()); |
| 29 MOCK_CONST_METHOD1(InputCvcIsValid, bool(const base::string16& input_text)); |
| 30 |
| 31 base::string16 GetCvcEnteredByUser() const override; |
| 32 void OnSaveButton(const base::string16& cvc = base::string16()) override; |
| 33 |
| 34 private: |
| 35 base::string16 cvc_entered_by_user_; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(MockSaveCardBubbleController); |
| 38 }; |
| 39 |
| 40 } // namespace autofill |
| 41 |
| 42 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_UI_MOCK_SAVE_CARD_BUBBLE_CONTROLLER_
H_ |
OLD | NEW |