OSDN Git Service

TextViewActions for Espresso-testing TextView.
authorAbodunrinwa Toki <toki@google.com>
Tue, 15 Sep 2015 20:15:56 +0000 (21:15 +0100)
committerAbodunrinwa Toki <toki@google.com>
Wed, 16 Sep 2015 14:58:55 +0000 (15:58 +0100)
commit90cdfe0514154bbc008d39f1c99f7a1d2684446c
tree376a385788b4ed526fef958aac03acf329e6b0d1
parent2126c60cc3d0bd79ef9a9e19dfe7febd53576bf4
TextViewActions for Espresso-testing TextView.

The plan is to add common TextView actions here so they can be used
in tests.
The locateTextAtIndex method is probably not the most efficient way
to locate a particular spot in the TextView but it works well enough
and doesn't use any private/hidden APIs. This might make it easy to
port this test as CTS.
Ideas on alternative implementations for this method are welcome.

Bug: 24102650
Change-Id: Ifb07cc86c58bd5833c37919fa9294a2374dba2a0
core/tests/coretests/src/android/widget/TextViewActivityTest.java
core/tests/coretests/src/android/widget/espresso/TextViewActions.java [new file with mode: 0644]