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