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

Issue 807766 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
OOO until Feb 4th
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocking:
issue 807768



Sign in to add a comment

Remove android.test.TouchUtils dependency

Project Member Reported by yolandyan@chromium.org, Jan 31 2018

Issue description

TestTouchUtils, AwTestTouchUtils, and TouchCommon contain duplicated and overlapping functionality, and they depends on android.test.TouchUtils, which is currently deprecated and replaced with Espresso.

This bug is to track the progress to refactoring and unify different test util classes.


 
Blocking: 807768

Comment 2 by boliu@chromium.org, Jan 31 2018

let's not switch to espresso unless we can get rid of waitUntilIdle after every interaction

AwTestTouchUtils and TouchCommon don't appear to use android.view.TouchUtils (yay?)

TestTouchUtils has a few users though, hopefully can be easily moved off it..?
Issue 512889 has been merged into this issue.

Comment 4 by wnwen@chromium.org, Feb 1 2018

Doesn't look that bad: https://cs.chromium.org/search/?q=%5B%5Ew%5DTestTouchUtils%5C.%5Ba-z%5D+lang:java&sq=package:chromium&type=cs

A lot of these calls don't heavily depend on the underlying base class, perhaps we can just remove the inheritance.

What do you think about rescoping this bug to just removing the dependency on android.test.TouchUtils from TestTouchUtils?

Comment 5 by wnwen@chromium.org, Feb 1 2018

Owner: wnwen@chromium.org
Status: Assigned (was: Available)
Will take a stab at removing the dependency.
Should we mark the CL from #3 as un-duplicate now?  It would be nice to have just one touch handling class, so unifying those three does seem good.

If I recall, I tried unifying touchcommon and testtouchutils many, many moons ago and was bitten by some cases where touches needed to be dispatched via a different method.  Still unifying them does seem like a nice thing to do if we can.
Project Member

Comment 7 by bugdroid1@chromium.org, Feb 1 2018

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

commit 230003484cb7b9c5feeb2d8087a656cd2123561d
Author: Peter Wen <wnwen@chromium.org>
Date: Thu Feb 01 18:55:50 2018

Android: Remove dependency on TouchUtils

android.test.TouchUtils is deprecated.

Bug:  807766 
Change-Id: Ib30f91f13afc9a1f7daf19a144dbd43eb06917b7
Reviewed-on: https://chromium-review.googlesource.com/897912
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533758}
[modify] https://crrev.com/230003484cb7b9c5feeb2d8087a656cd2123561d/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestTouchUtils.java
[modify] https://crrev.com/230003484cb7b9c5feeb2d8087a656cd2123561d/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TouchCommon.java

Comment 8 by wnwen@chromium.org, Feb 1 2018

Labels: OS-Android
Status: Fixed (was: Assigned)
Summary: Remove android.test.TouchUtils dependency (was: Unify and refactor UI interaction test util classes with Espresso)

Sign in to add a comment