This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Fix TestAccessibilityBridgeDelegate event caching #30260
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TestAccessibilityBridgeDelegate::accessibility_events previously held values of type ui::AXEventGenerator::TargetedEvent. TargetedEvent contains an AXNode pointer and a const reference to a ui::AXEventGenerator::EventParams object, and as such it's unsafe to make or read copies of TargetedEvent values outside the scope of the AccessibilityBridgeDelegate::OnAccessibilityEvent callback. In this patch, we update the accessibility_events vector to simply hold EventType values since this is the only part of the value we use in our existing tests. If in future we need the full TargetedEvent, we'll need to properly copy these values. This patch also fixes a typo in the accessibility_events identifier and converts an EXPECT_EQ to an ASSERT_EQ in a case where the following test expectations are meaningless/could crash if the accessibility_events size isn't as expected. Issue: flutter/flutter#77838
8 tasks
tvolkert
approved these changes
Dec 10, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 10, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 10, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 10, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 10, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 10, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 11, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 11, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 11, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 11, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 11, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 11, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 11, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 11, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 12, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 12, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 12, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 12, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 12, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 12, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 12, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 12, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 12, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 12, 2021
zanderso
pushed a commit
to flutter/flutter
that referenced
this pull request
Dec 12, 2021
* 37223ca [fuchsia] Use network-legacy-deprecated pkg in embedder test (flutter/engine#30244) * 86769ee Roll Dart SDK from 2ace65b1b408 to 2091ff49c513 (8 revisions) (flutter/engine#30251) * 5312e55 Win32: Handle OnAccessibilityEvent (flutter/engine#30176) * 8fd8912 Revert the latest rolls of the Fuchsia SDK (flutter/engine#30254) * df21689 Call IAccessible::accFocus to move a11y focus (flutter/engine#30256) * 6aa8d5c Simplify win32 platform node delegate GetParent (flutter/engine#30258) * ff328f0 Fix TestAccessibilityBridgeDelegate event caching (flutter/engine#30260) * 842281e Test shell/platform/common a11y code on Windows (flutter/engine#30262) * 806d8bc Roll Dart SDK from 2091ff49c513 to 7b6056f9db7f (1 revision) (flutter/engine#30259) * 1ed10bb Android accessibility bridge also fire selection change event when it predict selection change. (flutter/engine#30199) * 71fdb89 Override FlutterPlatformNodeDelegate::GetUniqueId (flutter/engine#30261) * 5aa7b30 Cleanup old ndk CIPD upload script (flutter/engine#30253) * 3653881 Roll Fuchsia Mac SDK from EcjcLVqar... to 1DgBWWOWV... (flutter/engine#30265) * f764864 Roll Skia from 44c81d149273 to a964a72174e8 (9 revisions) (flutter/engine#30255) * 2eca05e Migrate to Mockito 4.1.0 (flutter/engine#30257) * 1a6005f Add iOS version to scenario golden images (flutter/engine#30263) * 59c6f28 Roll Fuchsia Linux SDK from 3rLypXNTd... to UPWdoQziF... (flutter/engine#30266) * 5502a0a Fix eglPresentationTimeANDROID is no effective (flutter/engine#30182) * bb20dd0 Roll Skia from a964a72174e8 to 4d35c0d31d79 (16 revisions) (flutter/engine#30269) * 33f4c32 Revert "Accessibility number formatting improvements for Windows (#29773)" (flutter/engine#30267) * 5ece42f Roll Dart SDK from 7b6056f9db7f to f568598a262e (4 revisions) (flutter/engine#30270) * 8d1272b Roll Dart SDK from f568598a262e to 49d5a2f58c4a (3 revisions) (flutter/engine#30277) * 8b074c8 Roll Fuchsia Mac SDK from 1DgBWWOWV... to GoQ7KEnqp... (flutter/engine#30278) * e1a71cf Roll Fuchsia Linux SDK from UPWdoQziF... to hhFGKobVD... (flutter/engine#30279) * 6dc4046 Roll Fuchsia Mac SDK from GoQ7KEnqp... to Y_9lCzY64... (flutter/engine#30280) * ff7d4d6 Roll Fuchsia Linux SDK from hhFGKobVD... to NAkkk-Vn5... (flutter/engine#30281) * 2f97ac4 Roll Dart SDK from 49d5a2f58c4a to 01a9d4e9ede7 (1 revision) (flutter/engine#30283) * 85f4d68 Roll Fuchsia Linux SDK from NAkkk-Vn5... to V2JLZw4H1... (flutter/engine#30285) * 5130b83 Roll Fuchsia Mac SDK from Y_9lCzY64... to xBCcWw6gj... (flutter/engine#30284) * e28882a Roll Dart SDK from 01a9d4e9ede7 to a78eae43582d (1 revision) (flutter/engine#30288) * 368e3cc Revert Dart SDK to 2ace65b1b408 (flutter/engine#30290)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TestAccessibilityBridgeDelegate::accessibility_eventspreviously held values of typeui::AXEventGenerator::TargetedEvent. TargetedEvent contains anAXNodepointer and a const reference to aui::AXEventGenerator::EventParamsobject, and as such it's unsafe to make or read copies ofTargetedEventvalues outside the scope of the AccessibilityBridgeDelegate::OnAccessibilityEvent callback.In this patch, we update the
accessibility_eventsvector to simply holdEventvalues since this is the only part of the value we use in our existing tests. If in future we need the fullTargetedEvent, we'll need to properly copy these values.This patch also fixes a typo in the
accessibility_eventsidentifier.Issue: flutter/flutter#77838
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.