Loading core/tests/coretests/src/android/widget/TextViewActivityTest.java +10 −0 Original line number Diff line number Diff line Loading @@ -213,6 +213,16 @@ public class TextViewActivityTest extends ActivityInstrumentationTestCase2<TextV onView(withId(R.id.textview)).check(hasSelection("young beautiful")); } @SmallTest public void testDoubleTapAndDragToSelect_multiLine() throws Exception { final String helloWorld = "abcd\n" + "efg\n" + "hijklm\n" + "nop"; onView(withId(R.id.textview)).perform(click()); onView(withId(R.id.textview)).perform(replaceText(helloWorld)); onView(withId(R.id.textview)).perform( doubleTapAndDragOnText(helloWorld.indexOf("m"), helloWorld.indexOf("a"))); onView(withId(R.id.textview)).check(hasSelection("abcd\nefg\nhijklm")); } @SmallTest public void testSelectBackwordsByTouch() throws Exception { final String helloWorld = "Hello king of the Jungle!"; Loading Loading
core/tests/coretests/src/android/widget/TextViewActivityTest.java +10 −0 Original line number Diff line number Diff line Loading @@ -213,6 +213,16 @@ public class TextViewActivityTest extends ActivityInstrumentationTestCase2<TextV onView(withId(R.id.textview)).check(hasSelection("young beautiful")); } @SmallTest public void testDoubleTapAndDragToSelect_multiLine() throws Exception { final String helloWorld = "abcd\n" + "efg\n" + "hijklm\n" + "nop"; onView(withId(R.id.textview)).perform(click()); onView(withId(R.id.textview)).perform(replaceText(helloWorld)); onView(withId(R.id.textview)).perform( doubleTapAndDragOnText(helloWorld.indexOf("m"), helloWorld.indexOf("a"))); onView(withId(R.id.textview)).check(hasSelection("abcd\nefg\nhijklm")); } @SmallTest public void testSelectBackwordsByTouch() throws Exception { final String helloWorld = "Hello king of the Jungle!"; Loading