Make 7 more layout tests async so that they pass in --release --accessibility-isolated-tree mode
<rdar://problem/85376470>
Created attachment 444139 [details] Patch
Committed r285778 (244222@main): <https://commits.webkit.org/244222@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 444139 [details].
(In reply to Tyler Wilcock from comment #2) > Created attachment 444139 [details] > Patch --- a/LayoutTests/accessibility/ancestor-computation.html +++ a/LayoutTests/accessibility/ancestor-computation.html + let elementsToCheck = [await waitForElementById(startElementId)]; Why is this an array? --- a/LayoutTests/accessibility/color-well.html +++ a/LayoutTests/accessibility/color-well.html + let axColorwell = await waitForElementById("empty_colorwell"); Do we really need to wait to get the accessible element for these elements? I would think we can get them without having to wait, i.e., just with AccessibilityController.accessibleElementById. In general, we should need to wait only if a mutation on the tree occurs, or if any property of elements change. In case of static docs where the JS is doing just reading of properties, we shouldn't need to wait. --- a/LayoutTests/resources/accessibility-helper.js +++ a/LayoutTests/resources/accessibility-helper.js +async function waitForExpression(element, expression, expectedValue) { Most (or all) calls to this function are followed by a shouldBE. Can we put the shouldBe as part of this function? As you did in one of the tests, with a more explicit name.
(In reply to Andres Gonzalez from comment #4) > (In reply to Tyler Wilcock from comment #2) > > Created attachment 444139 [details] > > Patch > > --- a/LayoutTests/accessibility/ancestor-computation.html > +++ a/LayoutTests/accessibility/ancestor-computation.html > > + let elementsToCheck = [await waitForElementById(startElementId)]; > > Why is this an array? > > --- a/LayoutTests/accessibility/color-well.html > +++ a/LayoutTests/accessibility/color-well.html > > + let axColorwell = await waitForElementById("empty_colorwell"); > > Do we really need to wait to get the accessible element for these elements? > I would think we can get them without having to wait, i.e., just with > AccessibilityController.accessibleElementById. > > In general, we should need to wait only if a mutation on the tree occurs, or > if any property of elements change. In case of static docs where the JS is > doing just reading of properties, we shouldn't need to wait. > > --- a/LayoutTests/resources/accessibility-helper.js > +++ a/LayoutTests/resources/accessibility-helper.js > > +async function waitForExpression(element, expression, expectedValue) { > > Most (or all) calls to this function are followed by a shouldBE. Can we put > the shouldBe as part of this function? As you did in one of the tests, with > a more explicit name. All good points. Addressing in: https://bugs.webkit.org/show_bug.cgi?id=233167