Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
flutter::testing::PlatformHandlerTest Class Reference
Inheritance diagram for flutter::testing::PlatformHandlerTest:
flutter::testing::WindowsTest flutter::testing::ThreadTest

Public Member Functions

 PlatformHandlerTest ()=default
 
virtual ~PlatformHandlerTest ()=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.
 
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.
 

Protected Member Functions

FlutterWindowsEngineengine ()
 
void UseHeadlessEngine ()
 
void UseEngineWithView ()
 

Detailed Description

Definition at line 138 of file platform_handler_unittests.cc.

Constructor & Destructor Documentation

◆ PlatformHandlerTest()

flutter::testing::PlatformHandlerTest::PlatformHandlerTest ( )
default

◆ ~PlatformHandlerTest()

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

Member Function Documentation

◆ engine()

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

Definition at line 144 of file platform_handler_unittests.cc.

144{ return engine_.get(); }

◆ UseEngineWithView()

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

Definition at line 152 of file platform_handler_unittests.cc.

152 {
153 FlutterWindowsEngineBuilder builder{GetContext()};
154
155 auto window = std::make_unique<NiceMock<MockWindowBindingHandler>>();
156
157 engine_ = builder.Build();
158 view_ = std::make_unique<FlutterWindowsView>(kImplicitViewId, engine_.get(),
159 std::move(window));
160
161 EngineModifier modifier{engine_.get()};
162 modifier.SetImplicitView(view_.get());
163 }
WindowsTestContext & GetContext()
GLFWwindow * window
Definition main.cc:45
constexpr int64_t kImplicitViewId

◆ UseHeadlessEngine()

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

Definition at line 146 of file platform_handler_unittests.cc.

146 {
147 FlutterWindowsEngineBuilder builder{GetContext()};
148
149 engine_ = builder.Build();
150 }

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