Flutter Engine
 
Loading...
Searching...
No Matches
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 ()
 
MockWindowsProcTableproc_table ()
 
void UseHeadlessEngine ()
 
void UseEngineWithView ()
 

Detailed Description

Definition at line 59 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 65 of file cursor_handler_unittests.cc.

65{ return engine_.get(); }

◆ proc_table()

MockWindowsProcTable * flutter::testing::CursorHandlerTest::proc_table ( )
inlineprotected

Definition at line 68 of file cursor_handler_unittests.cc.

68{ return windows_proc_table_.get(); }

◆ UseEngineWithView()

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

Definition at line 76 of file cursor_handler_unittests.cc.

76 {
77 windows_proc_table_ = std::make_shared<MockWindowsProcTable>();
78
79 FlutterWindowsEngineBuilder builder{GetContext()};
80 builder.SetWindowsProcTable(windows_proc_table_);
81
82 auto window = std::make_unique<MockWindowBindingHandler>();
83 EXPECT_CALL(*window.get(), SetView).Times(1);
84 EXPECT_CALL(*window.get(), GetWindowHandle).WillRepeatedly(Return(nullptr));
85
86 window_ = window.get();
87 engine_ = builder.Build();
88 view_ = engine_->CreateView(std::move(window));
89 }
WindowsTestContext & GetContext()

References flutter::testing::WindowsTest::GetContext(), and window().

◆ UseHeadlessEngine()

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

Definition at line 70 of file cursor_handler_unittests.cc.

70 {
71 FlutterWindowsEngineBuilder builder{GetContext()};
72
73 engine_ = builder.Build();
74 }

References flutter::testing::WindowsTest::GetContext().

◆ view()

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

Definition at line 66 of file cursor_handler_unittests.cc.

66{ return view_.get(); }

◆ window()

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

Definition at line 67 of file cursor_handler_unittests.cc.

67{ return window_; }

Referenced by UseEngineWithView().


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