Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e36dbd5a authored by Sara Kato's avatar Sara Kato Committed by Android (Google) Code Review
Browse files

Merge "Add test doubleTapAndDragToSelect_multiLine"

parents c57da630 68c433d6
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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!";