Flutter Engine
 
Loading...
Searching...
No Matches
flutter::testing::RuntimeControllerTester Class Reference

Public Member Functions

 RuntimeControllerTester (UIDartState::Context &context)
 
void CanUpdateSemanticsWhenSetSemanticsTreeEnabled (SemanticsUpdate *update)
 
void CanUpdateSetApplicationLocale ()
 

Detailed Description

Definition at line 81 of file runtime_controller_unittests.cc.

Constructor & Destructor Documentation

◆ RuntimeControllerTester()

flutter::testing::RuntimeControllerTester::RuntimeControllerTester ( UIDartState::Context context)
inlineexplicit

Definition at line 83 of file runtime_controller_unittests.cc.

84 : context_(context),
85 runtime_controller_(delegate_,
86 nullptr,
87 {},
88 {},
89 {},
90 {},
91 {},
92 nullptr,
93 context_) {}

Member Function Documentation

◆ CanUpdateSemanticsWhenSetSemanticsTreeEnabled()

void flutter::testing::RuntimeControllerTester::CanUpdateSemanticsWhenSetSemanticsTreeEnabled ( SemanticsUpdate update)
inline

Definition at line 95 of file runtime_controller_unittests.cc.

95 {
96 ASSERT_TRUE(delegate_.updates.empty());
97 ASSERT_TRUE(delegate_.actions.empty());
98 runtime_controller_.SetSemanticsTreeEnabled(true);
99 runtime_controller_.UpdateSemantics(0, update);
100 ASSERT_FALSE(delegate_.updates.empty());
101 ASSERT_FALSE(delegate_.actions.empty());
102 }
void SetSemanticsTreeEnabled(bool enabled) override
Notifies whether Framework starts generating semantics tree.
void UpdateSemantics(int64_t view_id, SemanticsUpdate *update) override
Receives an updated semantics tree from the Framework.
std::vector< CustomAccessibilityActionUpdates > actions
std::vector< SemanticsNodeUpdates > updates

References flutter::testing::MockRuntimeDelegate::actions, flutter::RuntimeController::SetSemanticsTreeEnabled(), flutter::testing::MockRuntimeDelegate::updates, and flutter::RuntimeController::UpdateSemantics().

◆ CanUpdateSetApplicationLocale()

void flutter::testing::RuntimeControllerTester::CanUpdateSetApplicationLocale ( )
inline

Definition at line 104 of file runtime_controller_unittests.cc.

104 {
105 ASSERT_TRUE(delegate_.locale.empty());
106 runtime_controller_.SetApplicationLocale("es-MX");
107 ASSERT_TRUE(delegate_.locale == "es-MX");
108 }
void SetApplicationLocale(std::string locale) override
Framework sets the application locale.

References flutter::testing::MockRuntimeDelegate::locale, and flutter::RuntimeController::SetApplicationLocale().


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