91 {
92
93 fuchsia::accessibility::semantics::SemanticsManagerHandle semantics_manager;
94 zx_status_t semantics_status =
95 services_provider_.service_directory()
96 ->Connect<fuchsia::accessibility::semantics::SemanticsManager>(
97 semantics_manager.NewRequest());
98 if (semantics_status != ZX_OK) {
100 << "fuchsia::accessibility::semantics::SemanticsManager connection "
101 "failed: "
102 << zx_status_get_string(semantics_status);
103 }
104
106 inspector_ = std::make_unique<inspect::Inspector>();
108 set_semantics_enabled_callback = [this](bool enabled) {
110 };
112 dispatch_semantics_action_callback =
115 };
116
117 fuchsia::ui::views::ViewRefControl view_ref_control;
118 fuchsia::ui::views::ViewRef view_ref;
120 0u, &view_ref_control.reference, &view_ref.reference);
121 ASSERT_EQ(status, ZX_OK);
122 view_ref_control.reference.replace(
123 ZX_DEFAULT_EVENTPAIR_RIGHTS & (~ZX_RIGHT_DUPLICATE),
124 &view_ref_control.reference);
125 view_ref.reference.replace(ZX_RIGHTS_BASIC, &view_ref.reference);
127 std::make_unique<flutter_runner::AccessibilityBridge>(
128 std::move(set_semantics_enabled_callback),
129 std::move(dispatch_semantics_action_callback),
130 std::move(semantics_manager), std::move(view_ref),
131 inspector_->GetRoot().CreateChild(
"test_node"));
132
134 }
std::function< void(bool)> SetSemanticsEnabledCallback
std::function< void(int32_t, flutter::SemanticsAction)> DispatchSemanticsActionCallback
std::vector< std::pair< int32_t, flutter::SemanticsAction > > actions
void DispatchSemanticsAction(int32_t node_id, flutter::SemanticsAction action)
void SetSemanticsEnabled(bool enabled)
AccessibilityBridgeTestDelegate accessibility_delegate_
std::unique_ptr< inspect::Inspector > inspector_
std::unique_ptr< flutter_runner::AccessibilityBridge > accessibility_bridge_
#define FML_LOG(severity)