blob: 10d29dd573ce32bf12d9e90595f8d0c908076dbd [file] [log] [blame]
Ioana Pandele961d0cd2019-02-06 12:33:451// Copyright 2019 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_AUTOFILL_MOCK_MANUAL_FILLING_CONTROLLER_H_
6#define CHROME_BROWSER_AUTOFILL_MOCK_MANUAL_FILLING_CONTROLLER_H_
7
Ioana Pandele67513a82019-06-11 10:21:008#include "base/macros.h"
Ioana Pandele961d0cd2019-02-06 12:33:459#include "chrome/browser/autofill/manual_filling_controller.h"
10#include "testing/gmock/include/gmock/gmock.h"
11
12class MockManualFillingController
13 : public ManualFillingController,
14 public base::SupportsWeakPtr<MockManualFillingController> {
15 public:
16 MockManualFillingController();
17 ~MockManualFillingController() override;
18
19 MOCK_METHOD1(OnAutomaticGenerationStatusChanged, void(bool));
20 MOCK_METHOD1(OnFilledIntoFocusedField, void(autofill::FillingStatus));
21 MOCK_METHOD2(RefreshSuggestionsForField,
Jan Wilken Dörrie4ebe0cec2019-05-23 20:20:4422 void(autofill::mojom::FocusedFieldType,
23 const autofill::AccessorySheetData&));
Ioana Pandele961d0cd2019-02-06 12:33:4524 MOCK_METHOD1(ShowWhenKeyboardIsVisible,
25 void(ManualFillingController::FillingSource));
Jan Wilken Dörriee965a7f12019-06-06 07:25:4926 MOCK_METHOD1(ShowTouchToFillSheet, void(const autofill::AccessorySheetData&));
Ioana Pandele67513a82019-06-11 10:21:0027 MOCK_METHOD1(DeactivateFillingSource,
28 void(ManualFillingController::FillingSource));
29 MOCK_METHOD0(Hide, void());
Ioana Pandele961d0cd2019-02-06 12:33:4530 MOCK_METHOD2(GetFavicon,
31 void(int, base::OnceCallback<void(const gfx::Image&)>));
Friedrich Horschig8e7605432019-05-29 08:32:1132 MOCK_METHOD2(OnFillingTriggered,
33 void(autofill::AccessoryTabType type,
34 const autofill::UserInfo::Field&));
Friedrich Horschigb33702c2019-05-24 14:56:5435 MOCK_CONST_METHOD1(OnOptionSelected,
36 void(autofill::AccessoryAction selected_action));
Ioana Pandele67513a82019-06-11 10:21:0037 MOCK_CONST_METHOD0(OnAutomaticGenerationRequested, void());
Ioana Pandele961d0cd2019-02-06 12:33:4538 MOCK_CONST_METHOD0(container_view, gfx::NativeView());
Ioana Pandele67513a82019-06-11 10:21:0039
40 private:
41 DISALLOW_COPY_AND_ASSIGN(MockManualFillingController);
Ioana Pandele961d0cd2019-02-06 12:33:4542};
43
44#endif // CHROME_BROWSER_AUTOFILL_MOCK_MANUAL_FILLING_CONTROLLER_H_