| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2013 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 CHROME_BROWSER_UI_AUTOFILL_MOCK_AUTOFILL_DIALOG_CONTROLLER_H_ | |
| 6 #define CHROME_BROWSER_UI_AUTOFILL_MOCK_AUTOFILL_DIALOG_CONTROLLER_H_ | |
| 7 | |
| 8 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" | |
| 9 #include "testing/gmock/include/gmock/gmock.h" | |
| 10 | |
| 11 namespace autofill { | |
| 12 | |
| 13 class MockAutofillDialogController : public AutofillDialogController { | |
| 14 public: | |
| 15 MockAutofillDialogController(); | |
| 16 virtual ~MockAutofillDialogController(); | |
| 17 | |
| 18 MOCK_CONST_METHOD0(DialogTitle, string16()); | |
| 19 MOCK_CONST_METHOD0(AccountChooserText, string16()); | |
| 20 MOCK_CONST_METHOD0(SignInLinkText, string16()); | |
| 21 MOCK_CONST_METHOD0(EditSuggestionText, string16()); | |
| 22 MOCK_CONST_METHOD0(CancelButtonText, string16()); | |
| 23 MOCK_CONST_METHOD0(ConfirmButtonText, string16()); | |
| 24 MOCK_CONST_METHOD0(SaveLocallyText, string16()); | |
| 25 MOCK_METHOD0(LegalDocumentsText, string16()); | |
| 26 MOCK_CONST_METHOD0(SignedInState, DialogSignedInState()); | |
| 27 MOCK_CONST_METHOD0(ShouldShowSpinner, bool()); | |
| 28 MOCK_CONST_METHOD0(ShouldOfferToSaveInChrome, bool()); | |
| 29 MOCK_METHOD0(MenuModelForAccountChooser, ui::MenuModel*()); | |
| 30 MOCK_METHOD0(AccountChooserImage, gfx::Image()); | |
| 31 MOCK_CONST_METHOD0(ShouldShowProgressBar, bool()); | |
| 32 MOCK_CONST_METHOD0(ButtonStripImage, gfx::Image()); | |
| 33 MOCK_CONST_METHOD0(GetDialogButtons, int()); | |
| 34 MOCK_CONST_METHOD0(ShouldShowDetailArea, bool()); | |
| 35 MOCK_CONST_METHOD1(IsDialogButtonEnabled, bool(ui::DialogButton button)); | |
| 36 MOCK_CONST_METHOD0(GetDialogOverlay, DialogOverlayState()); | |
| 37 MOCK_METHOD0(LegalDocumentLinks, const std::vector<ui::Range>&()); | |
| 38 MOCK_CONST_METHOD1(SectionIsActive, bool(DialogSection)); | |
| 39 MOCK_CONST_METHOD1(RequestedFieldsForSection, | |
| 40 const DetailInputs&(DialogSection)); | |
| 41 MOCK_METHOD1(ComboboxModelForAutofillType, | |
| 42 ui::ComboboxModel*(AutofillFieldType)); | |
| 43 MOCK_METHOD1(MenuModelForSection, ui::MenuModel*(DialogSection)); | |
| 44 MOCK_CONST_METHOD1(LabelForSection, string16(DialogSection section)); | |
| 45 MOCK_METHOD1(SuggestionStateForSection, SuggestionState(DialogSection)); | |
| 46 MOCK_METHOD1(EditClickedForSection, void(DialogSection section)); | |
| 47 MOCK_METHOD1(EditCancelledForSection, void(DialogSection section)); | |
| 48 MOCK_CONST_METHOD2(IconForField, | |
| 49 gfx::Image(AutofillFieldType, const string16&)); | |
| 50 MOCK_METHOD3(InputValidityMessage, | |
| 51 string16(DialogSection, AutofillFieldType, const string16&)); | |
| 52 MOCK_METHOD3(InputsAreValid, ValidityData(DialogSection, | |
| 53 const DetailOutputMap&, | |
| 54 ValidationType)); | |
| 55 MOCK_METHOD6(UserEditedOrActivatedInput,void(DialogSection, | |
| 56 const DetailInput*, | |
| 57 gfx::NativeView, | |
| 58 const gfx::Rect&, | |
| 59 const string16&, | |
| 60 bool was_edit)); | |
| 61 MOCK_METHOD1(HandleKeyPressEventInInput, | |
| 62 bool(const content::NativeWebKeyboardEvent& event)); | |
| 63 MOCK_METHOD0(FocusMoved, void()); | |
| 64 MOCK_CONST_METHOD0(SplashPageImage, gfx::Image()); | |
| 65 MOCK_METHOD0(ViewClosed, void()); | |
| 66 MOCK_METHOD0(CurrentNotifications,std::vector<DialogNotification>()); | |
| 67 MOCK_CONST_METHOD0(CurrentAutocheckoutSteps, | |
| 68 std::vector<DialogAutocheckoutStep>()); | |
| 69 MOCK_METHOD0(SignInLinkClicked, void()); | |
| 70 MOCK_METHOD2(NotificationCheckboxStateChanged, | |
| 71 void(DialogNotification::Type, bool)); | |
| 72 MOCK_METHOD1(LegalDocumentLinkClicked, void(const ui::Range&)); | |
| 73 MOCK_METHOD0(OverlayButtonPressed, void()); | |
| 74 MOCK_METHOD0(OnCancel, bool()); | |
| 75 MOCK_METHOD0(OnAccept, bool()); | |
| 76 MOCK_METHOD0(profile, Profile*()); | |
| 77 MOCK_METHOD0(web_contents, content::WebContents*()); | |
| 78 private: | |
| 79 DetailInputs default_inputs_; | |
| 80 DetailInputs cc_default_inputs_; // Default inputs for SECTION_CC. | |
| 81 std::vector<ui::Range> range_; | |
| 82 }; | |
| 83 | |
| 84 } // namespace autofill | |
| 85 | |
| 86 #endif // CHROME_BROWSER_UI_AUTOFILL_MOCK_AUTOFILL_DIALOG_CONTROLLER_H_ | |
| OLD | NEW |