Flutter Engine
 
Loading...
Searching...
No Matches
flutter_runner::testing::PlatformViewTests Class Reference
Inheritance diagram for flutter_runner::testing::PlatformViewTests:

Protected Member Functions

 PlatformViewTests ()
 
async_dispatcher_t * dispatcher ()
 
void RunLoopUntilIdle ()
 
void RunLoopOnce ()
 
fuchsia::ui::input3::KeyEvent MakeEvent (fuchsia::ui::input3::KeyEventType event_type, std::optional< fuchsia::ui::input3::Modifiers > modifiers, fuchsia::input::Key key)
 
fuchsia::ui::composition::ChildViewWatcherPtr MakeChildViewWatcher ()
 

Detailed Description

Definition at line 529 of file platform_view_unittest.cc.

Constructor & Destructor Documentation

◆ PlatformViewTests()

flutter_runner::testing::PlatformViewTests::PlatformViewTests ( )
inlineprotected

Definition at line 531 of file platform_view_unittest.cc.

531: loop_(&kAsyncLoopConfigAttachToCurrentThread) {}

Member Function Documentation

◆ dispatcher()

async_dispatcher_t * flutter_runner::testing::PlatformViewTests::dispatcher ( )
inlineprotected

Definition at line 533 of file platform_view_unittest.cc.

533{ return loop_.dispatcher(); }

◆ MakeChildViewWatcher()

fuchsia::ui::composition::ChildViewWatcherPtr flutter_runner::testing::PlatformViewTests::MakeChildViewWatcher ( )
inlineprotected

Definition at line 559 of file platform_view_unittest.cc.

559 {
560 fuchsia::ui::composition::ChildViewWatcherPtr ptr;
561 auto watcher = std::make_unique<MockChildViewWatcher>(
562 ptr.NewRequest(loop_.dispatcher()));
563 child_view_watchers_.push_back(std::move(watcher));
564 return ptr;
565 }

◆ MakeEvent()

fuchsia::ui::input3::KeyEvent flutter_runner::testing::PlatformViewTests::MakeEvent ( fuchsia::ui::input3::KeyEventType  event_type,
std::optional< fuchsia::ui::input3::Modifiers >  modifiers,
fuchsia::input::Key  key 
)
inlineprotected

Definition at line 545 of file platform_view_unittest.cc.

548 {
549 fuchsia::ui::input3::KeyEvent event;
550 event.set_timestamp(++event_timestamp_);
551 event.set_type(event_type);
552 if (modifiers.has_value()) {
553 event.set_modifiers(modifiers.value());
554 }
555 event.set_key(key);
556 return event;
557 }
ax::mojom::Event event_type

References event_type, and key.

◆ RunLoopOnce()

void flutter_runner::testing::PlatformViewTests::RunLoopOnce ( )
inlineprotected

Definition at line 540 of file platform_view_unittest.cc.

540 {
541 loop_.Run(zx::time::infinite(), true);
542 loop_.ResetQuit();
543 }

◆ RunLoopUntilIdle()

void flutter_runner::testing::PlatformViewTests::RunLoopUntilIdle ( )
inlineprotected

Definition at line 535 of file platform_view_unittest.cc.

535 {
536 loop_.RunUntilIdle();
537 loop_.ResetQuit();
538 }

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