Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
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 535 of file platform_view_unittest.cc.

Constructor & Destructor Documentation

◆ PlatformViewTests()

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

Definition at line 537 of file platform_view_unittest.cc.

537: loop_(&kAsyncLoopConfigAttachToCurrentThread) {}

Member Function Documentation

◆ dispatcher()

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

Definition at line 539 of file platform_view_unittest.cc.

539{ return loop_.dispatcher(); }

◆ MakeChildViewWatcher()

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

Definition at line 565 of file platform_view_unittest.cc.

565 {
566 fuchsia::ui::composition::ChildViewWatcherPtr ptr;
567 auto watcher = std::make_unique<MockChildViewWatcher>(
568 ptr.NewRequest(loop_.dispatcher()));
569 child_view_watchers_.push_back(std::move(watcher));
570 return ptr;
571 }

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

554 {
555 fuchsia::ui::input3::KeyEvent event;
556 event.set_timestamp(++event_timestamp_);
557 event.set_type(event_type);
558 if (modifiers.has_value()) {
559 event.set_modifiers(modifiers.value());
560 }
561 event.set_key(key);
562 return event;
563 }
ax::mojom::Event event_type

References event_type, and key.

◆ RunLoopOnce()

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

Definition at line 546 of file platform_view_unittest.cc.

546 {
547 loop_.Run(zx::time::infinite(), true);
548 loop_.ResetQuit();
549 }

◆ RunLoopUntilIdle()

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

Definition at line 541 of file platform_view_unittest.cc.

541 {
542 loop_.RunUntilIdle();
543 loop_.ResetQuit();
544 }

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