Flutter Engine
The Flutter Engine
Public Member Functions | Protected Member Functions | List of all members
flutter::testing::TextInputPluginTest Class Reference
Inheritance diagram for flutter::testing::TextInputPluginTest:
flutter::testing::WindowsTest flutter::testing::ThreadTest

Public Member Functions

 TextInputPluginTest ()=default
 
virtual ~TextInputPluginTest ()=default
 
- Public Member Functions inherited from flutter::testing::WindowsTest
 WindowsTest ()
 
std::string GetFixturesDirectory () const
 
WindowsTestContextGetContext ()
 
- Public Member Functions inherited from flutter::testing::ThreadTest
 ThreadTest ()
 
fml::RefPtr< fml::TaskRunnerGetCurrentTaskRunner ()
 Get the task runner for the thread that the current unit-test is running on. This creates a message loop as necessary. More...
 
fml::RefPtr< fml::TaskRunnerCreateNewThread (const std::string &name="")
 Creates a new thread, initializes a message loop on it, and, returns its task runner to the unit-test. The message loop is terminated (and its thread joined) when the test ends. This allows tests to create multiple named threads as necessary. More...
 

Protected Member Functions

FlutterWindowsEngineengine ()
 
MockFlutterWindowsView * view ()
 
MockWindowBindingHandlerwindow ()
 
void UseHeadlessEngine ()
 
void UseEngineWithView ()
 

Detailed Description

Definition at line 122 of file text_input_plugin_unittest.cc.

Constructor & Destructor Documentation

◆ TextInputPluginTest()

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

◆ ~TextInputPluginTest()

virtual flutter::testing::TextInputPluginTest::~TextInputPluginTest ( )
virtualdefault

Member Function Documentation

◆ engine()

FlutterWindowsEngine * flutter::testing::TextInputPluginTest::engine ( )
inlineprotected

Definition at line 128 of file text_input_plugin_unittest.cc.

128{ return engine_.get(); }

◆ UseEngineWithView()

void flutter::testing::TextInputPluginTest::UseEngineWithView ( )
inlineprotected

Definition at line 138 of file text_input_plugin_unittest.cc.

138 {
139 FlutterWindowsEngineBuilder builder{GetContext()};
140
141 auto window = std::make_unique<MockWindowBindingHandler>();
142
143 window_ = window.get();
144 EXPECT_CALL(*window_, SetView).Times(1);
145 EXPECT_CALL(*window, GetWindowHandle).WillRepeatedly(Return(nullptr));
146
147 engine_ = builder.Build();
148 view_ = std::make_unique<MockFlutterWindowsView>(engine_.get(),
149 std::move(window));
150
151 EngineModifier modifier{engine_.get()};
152 modifier.SetImplicitView(view_.get());
153 }
WindowsTestContext & GetContext()
Definition: windows_test.cc:21

◆ UseHeadlessEngine()

void flutter::testing::TextInputPluginTest::UseHeadlessEngine ( )
inlineprotected

Definition at line 132 of file text_input_plugin_unittest.cc.

132 {
133 FlutterWindowsEngineBuilder builder{GetContext()};
134
135 engine_ = builder.Build();
136 }

◆ view()

MockFlutterWindowsView * flutter::testing::TextInputPluginTest::view ( )
inlineprotected

Definition at line 129 of file text_input_plugin_unittest.cc.

129{ return view_.get(); }

◆ window()

MockWindowBindingHandler * flutter::testing::TextInputPluginTest::window ( )
inlineprotected

Definition at line 130 of file text_input_plugin_unittest.cc.

130{ return window_; }

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