Commit 7de3aa58 authored by jonross's avatar jonross Committed by Commit Bot

Update TouchAccessibilityBrowserTest hit test waiting

Currently TouchAccessibilityBrowserTest.TouchExplorationInCrossSiteIframe is
calling WaitForChildFrameSurfaceReady. However it is not actually waiting, as
the frame it is providing is not a RenderWidgetHostViewChildFrame.

This change updates the call to the new hit testing api HitTestRegionObserver.
This will allow the test to properly wait on hit testing data while run under
Viz. While maintaining the current early exit for non-Viz.

TEST=TouchAccessibilityBrowserTest.TouchExplorationInCrossSiteIframe

Bug: 787945
Change-Id: Ica7fa92e7dcb5ea3d7a5b9702f9c5d077d929c07
Reviewed-on: https://chromium-review.googlesource.com/1102570Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Jonathan Ross <jonross@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568054}
parent 5e1018ba
......@@ -10,6 +10,7 @@
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/hit_test_region_observer.h"
#include "content/shell/browser/shell.h"
#include "content/test/accessibility_browser_test_utils.h"
#include "content/test/content_browser_test_utils_internal.h"
......@@ -169,10 +170,11 @@ IN_PROC_BROWSER_TEST_F(TouchAccessibilityBrowserTest,
child_frame->GetOrCreateBrowserAccessibilityManager();
ASSERT_NE(nullptr, child_manager);
// If OOPIFs are enabled, wait until compositor frames are all properly
// displayed, otherwise the touch event will not get sent to the correct
// renderer process.
WaitForChildFrameSurfaceReady(child_frame);
// If OOPIFs are enabled, wait until hit testing data is ready, otherwise the
// touch event will not get sent to the correct renderer process. However the
// |child_frame| being used here is not actually a
// RenderWidgetHostViewChildFrame.
WaitForHitTestDataOrChildSurfaceReady(child_frame);
// Send a touch exploration event to the button in the first iframe.
// A touch exploration event is just a mouse move event with
......
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