| Flutter Windows Embedder |

Public Member Functions | Protected Member Functions | List of all members
flutter::testing::TextInputPluginTest Class Reference
Inheritance diagram for flutter::testing::TextInputPluginTest:

## Public Member Functions
| TextInputPluginTest ()=default
virtual | ~TextInputPluginTest ()=default

## Protected Member Functions
FlutterWindowsEngine * | engine ()
MockFlutterWindowsView * | view ()
MockWindowBindingHandler * | window ()
void | UseHeadlessEngine ()
void | UseEngineWithView ()
std::unique_ptr< MockFlutterWindowsView > | AddViewWithId (int view_id)

## Detailed Description

Definition at line 140 of file text_input_plugin_unittest.cc.

## Constructor & Destructor Documentation

## ◆ TextInputPluginTest()

flutter::testing::TextInputPluginTest::TextInputPluginTest | ( |  | ) |
| default

## ◆ ~TextInputPluginTest()

virtual flutter::testing::TextInputPluginTest::~TextInputPluginTest | ( |  | ) |
| virtual default

## Member Function Documentation

## ◆ AddViewWithId()

std::unique_ptr<MockFlutterWindowsView> flutter::testing::TextInputPluginTest::AddViewWithId | ( | int | view_id | ) |
| inline protected

Definition at line 173 of file text_input_plugin_unittest.cc.

173 {
174 EXPECT_NE(engine_, nullptr);
175 auto window = std::make_unique<MockWindowBindingHandler>();
176 EXPECT_CALL(*window, SetView).Times(1);
177 EXPECT_CALL(*window, GetWindowHandle).WillRepeatedly(Return(nullptr));
178 auto view = std::make_unique<MockFlutterWindowsView>(engine_.get(),
179 std::move(window));
180
181 EngineModifier modifier{engine_.get()};
182 modifier.SetViewById(view_.get(), view_id);
183 return view;
184 }
flutter::testing::TextInputPluginTest::window
MockWindowBindingHandler * window()
Definition: text_input_plugin_unittest.cc:148
flutter::testing::TextInputPluginTest::view
MockFlutterWindowsView * view()
Definition: text_input_plugin_unittest.cc:147

References view(), and window().

## ◆ engine()

FlutterWindowsEngine* flutter::testing::TextInputPluginTest::engine | ( |  | ) |
| inline protected

Definition at line 146 of file text_input_plugin_unittest.cc.

146 { return engine_.get(); }

## ◆ UseEngineWithView()

void flutter::testing::TextInputPluginTest::UseEngineWithView | ( |  | ) |
| inline protected

Definition at line 156 of file text_input_plugin_unittest.cc.

156 {
157 FlutterWindowsEngineBuilder builder{GetContext()};
158
159 auto window = std::make_unique<MockWindowBindingHandler>();
160
161 window_ = window.get();
162 EXPECT_CALL(*window_, SetView).Times(1);
163 EXPECT_CALL(*window, GetWindowHandle).WillRepeatedly(Return(nullptr));
164
165 engine_ = builder.Build();
166 view_ = std::make_unique<MockFlutterWindowsView>(engine_.get(),
167 std::move(window));
168
169 EngineModifier modifier{engine_.get()};
170 modifier.SetViewById(view_.get(), 456);
171 }

References window().

## ◆ UseHeadlessEngine()

void flutter::testing::TextInputPluginTest::UseHeadlessEngine | ( |  | ) |
| inline protected

Definition at line 150 of file text_input_plugin_unittest.cc.

150 {
151 FlutterWindowsEngineBuilder builder{GetContext()};
152
153 engine_ = builder.Build();
154 }

## ◆ view()

MockFlutterWindowsView* flutter::testing::TextInputPluginTest::view | ( |  | ) |
| inline protected

Definition at line 147 of file text_input_plugin_unittest.cc.

147 { return view_.get(); }

Referenced by AddViewWithId().

## ◆ window()

MockWindowBindingHandler* flutter::testing::TextInputPluginTest::window | ( |  | ) |
| inline protected

Definition at line 148 of file text_input_plugin_unittest.cc.

148 { return window_; }

Referenced by AddViewWithId(), and UseEngineWithView().

The documentation for this class was generated from the following file:

- shell/platform/windows/text_input_plugin_unittest.cc