New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 799256 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

We should wait for interactability in Android loadUrl* test helpers

Project Member Reported by ericrk@chromium.org, Jan 4 2018

Issue description

When Chrome android tests load a URL, they wait for the page load event as well as instrumentation idle sync. At this point, many tests immediately start interacting with the page. Unfortunately, this doesn't guarantee page interactability, as we wait for any layout animations to complete before a tab becomes interactive. We should additionally wait on interactability, to ensure no test input is dropped.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/44e01ce042493dbc6289e0d148b6bcc6f258e537

commit 44e01ce042493dbc6289e0d148b6bcc6f258e537
Author: Eric Karl <ericrk@chromium.org>
Date: Fri Jan 05 19:09:14 2018

Wait for interactability in loadUrl* Android test helpers

Currently, when Chrome Android tests load a URL, they wait for the page
load event as well as instrumentation idle sync. At this point, many
tests immediately start interacting with the page. Unfortunately, this
doesn't guarantee page interactability, as Android waits for any layout
animations to complete before a tab becomes interactive. This can lead
to timing issues (as experienced in
https://chromium-review.googlesource.com/c/chromium/src/+/832959/24).

This change adds a new call, ChromeTabUtils.waitForInteractable, which
ensures that the tab is in a state where it can receive interactions.
The loadUrl* functions are updated to wait for this signal before
returning.

Bug:  799256 
Change-Id: I1fa92dc825e13f13a6273311a215064a7cb5b3ef
Reviewed-on: https://chromium-review.googlesource.com/851335
Commit-Queue: Eric Karl <ericrk@chromium.org>
Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527339}
[modify] https://crrev.com/44e01ce042493dbc6289e0d148b6bcc6f258e537/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestRule.java
[modify] https://crrev.com/44e01ce042493dbc6289e0d148b6bcc6f258e537/chrome/test/android/javatests/src/org/chromium/chrome/test/util/ChromeTabUtils.java

Status: Fixed (was: Assigned)

Sign in to add a comment