Flutter Engine
The Flutter Engine
mock_text_input_manager.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter 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 FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_MOCK_TEXT_INPUT_MANAGER_H_
6#define FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_MOCK_TEXT_INPUT_MANAGER_H_
7
8#include <cstring>
9#include <optional>
10
11#include "flutter/fml/macros.h"
12#include "flutter/shell/platform/windows/text_input_manager.h"
13#include "gmock/gmock.h"
14
15namespace flutter {
16namespace testing {
17
18/// Mock for the |Window| base class.
20 public:
23
24 MOCK_METHOD(std::optional<std::u16string>,
26 (),
27 (const, override));
28 MOCK_METHOD(std::optional<std::u16string>,
30 (),
31 (const, override));
32 MOCK_METHOD(long, GetComposingCursorPosition, (), (const, override));
33
34 private:
35 FML_DISALLOW_COPY_AND_ASSIGN(MockTextInputManager);
36};
37
38} // namespace testing
39} // namespace flutter
40
41#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_MOCK_TEXT_INPUT_MANAGER_H_
virtual std::optional< std::u16string > GetComposingString() const
virtual std::optional< std::u16string > GetResultString() const
virtual long GetComposingCursorPosition() const
Mock for the |Window| base class.
MOCK_METHOD(std::optional< std::u16string >, GetComposingString,(),(const, override))
MOCK_METHOD(long, GetComposingCursorPosition,(),(const, override))
MOCK_METHOD(std::optional< std::u16string >, GetResultString,(),(const, override))