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

Public Member Functions

 CursorHandlerTest ()=default
 
virtual ~CursorHandlerTest ()=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 ()
 
FlutterWindowsViewview ()
 
MockWindowBindingHandlerwindow ()
 
void UseHeadlessEngine ()
 
void UseEngineWithView ()
 

Detailed Description

Definition at line 57 of file cursor_handler_unittests.cc.

Constructor & Destructor Documentation

◆ CursorHandlerTest()

flutter::testing::CursorHandlerTest::CursorHandlerTest ( )
default

◆ ~CursorHandlerTest()

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

Member Function Documentation

◆ engine()

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

Definition at line 63 of file cursor_handler_unittests.cc.

63{ return engine_.get(); }

◆ UseEngineWithView()

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

Definition at line 73 of file cursor_handler_unittests.cc.

73 {
74 FlutterWindowsEngineBuilder builder{GetContext()};
75
76 auto window = std::make_unique<MockWindowBindingHandler>();
77 EXPECT_CALL(*window.get(), SetView).Times(1);
78 EXPECT_CALL(*window.get(), GetWindowHandle).WillRepeatedly(Return(nullptr));
79
80 window_ = window.get();
81 engine_ = builder.Build();
82 view_ = std::make_unique<FlutterWindowsView>(kImplicitViewId, engine_.get(),
83 std::move(window));
84
85 EngineModifier modifier{engine_.get()};
86 modifier.SetImplicitView(view_.get());
87 }
WindowsTestContext & GetContext()
constexpr int64_t kImplicitViewId

◆ UseHeadlessEngine()

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

Definition at line 67 of file cursor_handler_unittests.cc.

67 {
68 FlutterWindowsEngineBuilder builder{GetContext()};
69
70 engine_ = builder.Build();
71 }

◆ view()

FlutterWindowsView * flutter::testing::CursorHandlerTest::view ( )
inlineprotected

Definition at line 64 of file cursor_handler_unittests.cc.

64{ return view_.get(); }

◆ window()

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

Definition at line 65 of file cursor_handler_unittests.cc.

65{ return window_; }

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