Flutter Engine
The Flutter Engine
Protected Member Functions | List of all members
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 525 of file platform_view_unittest.cc.

Constructor & Destructor Documentation

◆ PlatformViewTests()

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

Definition at line 527 of file platform_view_unittest.cc.

527: loop_(&kAsyncLoopConfigAttachToCurrentThread) {}

Member Function Documentation

◆ dispatcher()

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

Definition at line 529 of file platform_view_unittest.cc.

529{ return loop_.dispatcher(); }

◆ MakeChildViewWatcher()

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

Definition at line 555 of file platform_view_unittest.cc.

555 {
556 fuchsia::ui::composition::ChildViewWatcherPtr ptr;
557 auto watcher = std::make_unique<MockChildViewWatcher>(
558 ptr.NewRequest(loop_.dispatcher()));
559 child_view_watchers_.push_back(std::move(watcher));
560 return ptr;
561 }

◆ 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 541 of file platform_view_unittest.cc.

544 {
545 fuchsia::ui::input3::KeyEvent event;
546 event.set_timestamp(++event_timestamp_);
547 event.set_type(event_type);
548 if (modifiers.has_value()) {
549 event.set_modifiers(modifiers.value());
550 }
551 event.set_key(key);
552 return event;
553 }
ax::mojom::Event event_type
FlKeyEvent * event

◆ RunLoopOnce()

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

Definition at line 536 of file platform_view_unittest.cc.

536 {
537 loop_.Run(zx::time::infinite(), true);
538 loop_.ResetQuit();
539 }

◆ RunLoopUntilIdle()

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

Definition at line 531 of file platform_view_unittest.cc.

531 {
532 loop_.RunUntilIdle();
533 loop_.ResetQuit();
534 }

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