Bug 237803

Summary: [ATSPI] accessibility/dropdown-value.html is timing out since added in 248145@main
Product: WebKit Reporter: Lauro Moura <lmoura>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: andresg_22, bugs-noreply, cgarcia, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=237483
Attachments:
Description Flags
Patch andresg_22: review+, ews-feeder: commit-queue-

Description Lauro Moura 2022-03-11 19:54:00 PST
accessibility/dropdown-value.html

Added in 248145@main

Times out awaiting for the value of `axSelect.stringValue` to become `"cat"`, which never happens.

This also makes the expectation differ in the debug message, as it's empty.
Comment 1 Radar WebKit Bug Importer 2022-03-11 19:54:10 PST
<rdar://problem/90193311>
Comment 2 Carlos Garcia Campos 2022-03-15 07:01:44 PDT
The problem is that the test expects that select element exposes the selected item text as string value. That's not the case of ATK/ATSPI. We can make it work in all platforms by waiting for the selected index to change instead (selectedChildAtIndex). If the intention of the test is to specifically check the string value, then it's better to move it under mac platform dir.

Btw, Andrés, please don't skip tests that aren't platform specific for GTK, because we might not notice it. If a test is failing for GTK just add us to the CC. If you are in a hurry, it's better to land the patch with the test failing for GTK than skipped for GTK.
Comment 3 Andres Gonzalez 2022-03-15 07:38:15 PDT
(In reply to Carlos Garcia Campos from comment #2)
> The problem is that the test expects that select element exposes the
> selected item text as string value. That's not the case of ATK/ATSPI. We can
> make it work in all platforms by waiting for the selected index to change
> instead (selectedChildAtIndex). If the intention of the test is to
> specifically check the string value, then it's better to move it under mac
> platform dir.
> 
> Btw, Andrés, please don't skip tests that aren't platform specific for GTK,
> because we might not notice it. If a test is failing for GTK just add us to
> the CC. If you are in a hurry, it's better to land the patch with the test
> failing for GTK than skipped for GTK.

Sorry about that, thought you were monitoring the GTK skips. Will do as suggested.
Comment 4 Carlos Garcia Campos 2022-03-15 07:45:06 PDT
(In reply to Andres Gonzalez from comment #3)
> (In reply to Carlos Garcia Campos from comment #2)
> > The problem is that the test expects that select element exposes the
> > selected item text as string value. That's not the case of ATK/ATSPI. We can
> > make it work in all platforms by waiting for the selected index to change
> > instead (selectedChildAtIndex). If the intention of the test is to
> > specifically check the string value, then it's better to move it under mac
> > platform dir.
> > 
> > Btw, Andrés, please don't skip tests that aren't platform specific for GTK,
> > because we might not notice it. If a test is failing for GTK just add us to
> > the CC. If you are in a hurry, it's better to land the patch with the test
> > failing for GTK than skipped for GTK.
> 
> Sorry about that, thought you were monitoring the GTK skips. Will do as
> suggested.

Thanks!
Comment 5 Carlos Garcia Campos 2022-03-15 07:46:08 PDT
So, would it be ok to change the test to wait for selected children change instead?
Comment 6 Andres Gonzalez 2022-03-15 08:11:01 PDT
(In reply to Carlos Garcia Campos from comment #5)
> So, would it be ok to change the test to wait for selected children change
> instead?

I think so, as you said we may use selectedChildAtIndex, and perhaps selectedChildrenCount. Can you log the stringValue in GTK for the selection?  It would be good to make sure that we don't only have the right selected object but that it also has the right text.
Comment 7 Carlos Garcia Campos 2022-03-17 02:07:07 PDT
(In reply to Andres Gonzalez from comment #6)
> (In reply to Carlos Garcia Campos from comment #5)
> > So, would it be ok to change the test to wait for selected children change
> > instead?
> 
> I think so, as you said we may use selectedChildAtIndex, and perhaps
> selectedChildrenCount. Can you log the stringValue in GTK for the selection?
> It would be good to make sure that we don't only have the right selected
> object but that it also has the right text.

Menu items don't expose the value as string value either, but as the name, so I would need to add an exception in WTR. So, maybe the easiest solution after all is to add the exception and leave the test as is.
Comment 8 Carlos Garcia Campos 2022-03-17 02:48:34 PDT
Created attachment 454945 [details]
Patch
Comment 9 Carlos Garcia Campos 2022-03-18 01:30:21 PDT
Committed r291471 (248587@trunk): <https://commits.webkit.org/248587@trunk>