19 std::vector<SemanticsNodeUpdates>
updates;
20 std::vector<CustomAccessibilityActionUpdates>
actions;
29 std::unique_ptr<flutter::LayerTree> layer_tree,
30 float device_pixel_ratio)
override {}
35 this->updates.push_back(update);
36 this->actions.push_back(
actions);
40 this->locale = std::move(
locale);
46 std::unique_ptr<PlatformMessage>
message)
override {}
55 int64_t isolate_port)
override {};
60 const std::vector<std::string>& supported_locale_data)
override {
76 int configuration_id)
const override {
85 runtime_controller_(delegate_,
96 ASSERT_TRUE(delegate_.
updates.empty());
97 ASSERT_TRUE(delegate_.
actions.empty());
100 ASSERT_FALSE(delegate_.
updates.empty());
101 ASSERT_FALSE(delegate_.
actions.empty());
105 ASSERT_TRUE(delegate_.
locale.empty());
107 ASSERT_TRUE(delegate_.
locale ==
"es-MX");
121 GetCurrentTaskRunner(),
127 auto tester = std::make_shared<RuntimeControllerTester>(context);
129 auto native_semantics_update = [tester,
130 &message_latch](Dart_NativeArguments
args) {
131 auto handle = Dart_GetNativeArgument(
args, 0);
133 Dart_Handle result = Dart_GetNativeInstanceField(
135 ASSERT_FALSE(Dart_IsError(result));
138 tester->CanUpdateSemanticsWhenSetSemanticsTreeEnabled(update);
142 Settings settings = CreateSettingsForFixture();
143 AddNativeCallback(
"SemanticsUpdate",
146 std::unique_ptr<Shell> shell = CreateShell(settings, task_runners);
148 ASSERT_TRUE(shell->IsSetup());
150 configuration.SetEntrypoint(
"sendSemanticsUpdate");
152 shell->RunEngine(std::move(configuration), [](
auto result) {
156 message_latch.
Wait();
157 DestroyShell(std::move(shell), task_runners);
162 GetCurrentTaskRunner(),
168 auto tester = std::make_shared<RuntimeControllerTester>(context);
169 tester->CanUpdateSetApplicationLocale();
static RunConfiguration InferFromSettings(const Settings &settings, const fml::RefPtr< fml::TaskRunner > &io_worker=nullptr, IsolateLaunchType launch_type=IsolateLaunchType::kNewGroup)
Attempts to infer a run configuration from the settings object. This tries to create a run configurat...
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.
void SetApplicationLocale(std::string locale) override
Framework sets the application locale.
void SetNeedsReportTimings(bool value) override
void RequestDartDeferredLibrary(intptr_t loading_unit_id) override
std::string DefaultRouteName() override
std::weak_ptr< PlatformMessageHandler > GetPlatformMessageHandler() const override
std::unique_ptr< std::vector< std::string > > ComputePlatformResolvedLocale(const std::vector< std::string > &supported_locale_data) override
void OnAllViewsRendered() override
void RequestViewFocusChange(const ViewFocusChangeRequest &request) override
void SetSemanticsTreeEnabled(bool enabled) override
std::vector< CustomAccessibilityActionUpdates > actions
double GetScaledFontSize(double unscaled_font_size, int configuration_id) const override
void ScheduleFrame(bool regenerate_layer_trees=true) override
FontCollection & GetFontCollection() override
std::vector< SemanticsNodeUpdates > updates
std::shared_ptr< AssetManager > GetAssetManager() override
void UpdateIsolateDescription(const std::string isolate_name, int64_t isolate_port) override
void SendChannelUpdate(std::string name, bool listening) override
void HandlePlatformMessage(std::unique_ptr< PlatformMessage > message) override
void OnRootIsolateCreated() override
void UpdateSemantics(int64_t view_id, SemanticsNodeUpdates update, CustomAccessibilityActionUpdates actions) override
void SetApplicationLocale(std::string locale) override
void Render(int64_t view_id, std::unique_ptr< flutter::LayerTree > layer_tree, float device_pixel_ratio) override
void CanUpdateSetApplicationLocale()
RuntimeControllerTester(UIDartState::Context &context)
void CanUpdateSemanticsWhenSetSemanticsTreeEnabled(SemanticsUpdate *update)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
G_BEGIN_DECLS GBytes * message
G_BEGIN_DECLS FlutterViewId view_id
TEST_F(DisplayListTest, Defaults)
std::unordered_map< int32_t, SemanticsNode > SemanticsNodeUpdates
std::unordered_map< int32_t, CustomAccessibilityAction > CustomAccessibilityActionUpdates
DEF_SWITCHES_START aot vmservice shared library name
The subset of state which is owned by the shell or engine and passed through the RuntimeController in...
#define CREATE_NATIVE_ENTRY(native_entry)