| 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 144 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 177 of file text_input_plugin_unittest.cc.

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

References view(), and window().

## ◆ engine()

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

Definition at line 150 of file text_input_plugin_unittest.cc.

150 { return engine_.get(); }

## ◆ UseEngineWithView()

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

Definition at line 160 of file text_input_plugin_unittest.cc.

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

References window().

## ◆ UseHeadlessEngine()

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

Definition at line 154 of file text_input_plugin_unittest.cc.

154 {
155 FlutterWindowsEngineBuilder builder{GetContext()};
156
157 engine_ = builder.Build();
158 }

## ◆ view()

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

Definition at line 151 of file text_input_plugin_unittest.cc.

151 { return view_.get(); }

Referenced by AddViewWithId().

## ◆ window()

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

Definition at line 152 of file text_input_plugin_unittest.cc.

152 { 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