summaryrefslogtreecommitdiff
path: root/extras/source/palettes/tonal.soc
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2025-03-15 10:53:41 -0700
committerMichael Weghorn <m.weghorn@posteo.de>2025-03-15 20:50:18 +0100
commit8e5f5938ed7316d1dbc6a1ad365ffd8e938c6e06 (patch)
treec10e21fda661738fed47497adacc90fd4888e2d0 /extras/source/palettes/tonal.soc
parentf69fa9e37232d0d41e5f224872d0e86391f19f2f (diff)
a11y tests: Don't assume that child on top has higher child index HEADmaster
An accessible can have multiple children at the same point. As the XAccessibleComponent::getAccessibleAtPoint doc says: @return If there is one child which is rendered so that its bounding box contains the test point then a reference to that object is returned. If there is more than one child which satisfies that condition then a reference to that one is returned that is painted on top of the others. If there is no child which is rendered at the test point an empty reference is returned. So far, XAccessibleComponentTester::testAccessibleAtPoint was making the assumption that if multiple children are at the same point, the one on top has the higher child index. Otherwise, the test would fail. The reason for that assumption is unclear. Replace that by checking whether the accessible returned by XAccessibleComponent::getAccessibleAtPoint is a direct child (by checking its parent) and actually contains the point instead. Without this, the test was seen failing in a WIP branch that converts the AccessibleDropDownListBox JUnit test to a cppunit test. Related failure output: Found 2 children * Found child: (0x562c20b3b7b8) role=TEXT name="" description="" states: ENABLED | SENSITIVE component: 0x562c20b3b770 bounds: X: 0, Y: 0, Width: 100, Height: 21 bounds: 100x21+0+0 finding the point which lies on the component Child found at point +0+0 * Found child: (0x562c20b30028) role=LIST name="" description="" states: ENABLED | FOCUSABLE | MANAGES_DESCENDANTS | SENSITIVE component: 0x562c20b30010 bounds: X: 0, Y: 20, Width: 100, Height: 88 bounds: 100x88+0+20 finding the point which lies on the component Child found at point +0+20 The child found ((0x562c20b3b7b8) role=TEXT name="" description="") is not the expected one ((0x562c20b30028) role=LIST name="" description="") /home/michi/development/git/libreoffice/test/source/a11y/XAccessibleComponentTester.cxx:204:AccessibleDropDownListBox::TestBody equality assertion failed - Expected: (0x562c20b30028) role=LIST name="" description="" - Actual : (0x562c20b3b7b8) role=TEXT name="" description="" - The child found is NOT the expected one Change-Id: I8bc01c333ff0b3b9e90948bfd21b5abb86989687 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182968 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
Diffstat (limited to 'extras/source/palettes/tonal.soc')
0 files changed, 0 insertions, 0 deletions