The call to PermissionsHelper.setPermission was not always propagating
to AXObjectCacheImpl right away. Previously we had a setTimeout(0),
which was enough most of the time but not reliable, leaking to
flaky tests.
Fix by adding a new test API to determine whether the permission
change has propagated to AXObjectCacheImpl, and don't resolve
the promise to continue the test until it has propagated.
Fixes: 1134459
Change-Id: I30ecf2514908bf19b824adde3929020194bd57c2
AX-Relnotes: N/A
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2815654
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Adam Ettenberger <Adam.Ettenberger@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#871109}