Test setting and retrieving selection with ignored nodes on ATK
In https://crrev.com/c/2205400/ a fix was made to the selection offsets that might be necessary whenever there are nodes in the internal accessibility tree that are ignored, i.e., they are not exposed to the platform tree. This patch adds a test for Linux ATK which checks whether either setting or retrieving the selection works properly in such a tree. A helper method is added to the test fixture that searches the ATK tree for a node with a specific role. Also took the opportunity to clean up the test fixture by adding comments, moving methods to be in declaration order, adding const, and renaming erroneously named variables. Example: <p> <div></div> <!-- ignored --> <span>Selected</span> </p> The anchor offset points to the second child of the paragraph and the focus offset to the third. However, the first child, the div, is not exposed to the platform tree because it is empty. The offsets should be adjusted accordingly, i.e., in ATK text, the anchor offset should be equal to 0 and the focus offset should equal the text's length. AX-Relnotes: n/a. R=dmazzoni@chromium.org Change-Id: I22fabbbdc3eea1648c088f35ee898ff307a97d24 Bug: 1082814 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2218042Reviewed-by:Joanmarie Diggs <jdiggs@igalia.com> Reviewed-by:
Dominic Mazzoni <dmazzoni@chromium.org> Commit-Queue: Nektarios Paisios <nektar@chromium.org> Cr-Commit-Position: refs/heads/master@{#773743}
Showing
This diff is collapsed.
Please register or sign in to comment