Bug 233167

Summary: AX: Simplify tests changed in https://bugs.webkit.org/show_bug.cgi?id=233085
Product: WebKit Reporter: Tyler Wilcock <tyler_w>
Component: AccessibilityAssignee: Tyler Wilcock <tyler_w>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, andresg_22, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Tyler Wilcock 2021-11-15 20:31:46 PST
In https://bugs.webkit.org/show_bug.cgi?id=233085 and https://bugs.webkit.org/show_bug.cgi?id=233017, we made some tests async so that they passed in --release --accessibility-isolated-tree mode. However, we can make these tests simpler and still pass — i.e., only wait for elements and expressions asynchronously when it's absolutely necessary.
Comment 1 Radar WebKit Bug Importer 2021-11-15 20:32:00 PST
<rdar://problem/85441015>
Comment 2 Tyler Wilcock 2021-11-15 20:37:25 PST
Created attachment 444337 [details]
Patch
Comment 3 Andres Gonzalez 2021-11-16 06:53:38 PST
(In reply to Tyler Wilcock from comment #2)
> Created attachment 444337 [details]
> Patch

--- a/LayoutTests/accessibility/mac/header.html
+++ a/LayoutTests/accessibility/mac/header.html

+    function expectRole(expectedRole, expectedDescription, id) {
+        shouldBeEqualToString(`accessibilityController.accessibleElementById("${id}").role`, "AXRole: " + expectedRole);
+        shouldBeEqualToString(`accessibilityController.accessibleElementById("${id}").roleDescription`, "AXRoleDescription: " + expectedDescription);

Can we do `AXRole: ${expectedRole}` and `AXRoleDescription: ${expectedDescription}` in the second params of the shouldBes?
Comment 4 Tyler Wilcock 2021-11-16 07:23:07 PST
Created attachment 444376 [details]
Patch
Comment 5 EWS 2021-11-16 11:26:43 PST
Committed r285874 (244300@main): <https://commits.webkit.org/244300@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 444376 [details].