Commit 0432cf90 authored by Kevin Babbitt's avatar Kevin Babbitt Committed by Commit Bot

Fix flakiness in accessibility hit testing browser tests

The cause of the flakiness is that we weren't waiting long enough for
the pinch zoom change to be reflected in the accessibility tree.
Waiting for kLocationChanged appears to address the issue - with this
change I was able to run the flaky test case 1000x without a single
failure.

Bug: 1069850, 1070647
Change-Id: If0cba1804776125885db3d0a2aedfeeca9340048
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2155077Reviewed-by: default avatarNektarios Paisios <nektar@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Kevin Babbitt <kbabbitt@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#760577}
parent f40f0d75
...@@ -224,7 +224,8 @@ class AccessibilityHitTestingBrowserTest ...@@ -224,7 +224,8 @@ class AccessibilityHitTestingBrowserTest
void SimulatePinchZoom(float desired_page_scale) { void SimulatePinchZoom(float desired_page_scale) {
RenderFrameSubmissionObserver observer(shell()->web_contents()); RenderFrameSubmissionObserver observer(shell()->web_contents());
AccessibilityNotificationWaiter accessibility_waiter( AccessibilityNotificationWaiter accessibility_waiter(
shell()->web_contents(), ui::AXMode(), ax::mojom::Event::kNone); shell()->web_contents(), ui::AXMode(),
ax::mojom::Event::kLocationChanged);
const gfx::Rect contents_rect = const gfx::Rect contents_rect =
shell()->web_contents()->GetContainerBounds(); shell()->web_contents()->GetContainerBounds();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment