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

Commit cf214300 authored by Evan Rosky's avatar Evan Rosky Committed by Android (Google) Code Review
Browse files

Merge "Fix ScrollView coretest"

parents 179bf5df 91d6a553
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -16,16 +16,14 @@

package android.widget.scroll;

import android.test.suitebuilder.annotation.Suppress;
import android.widget.scroll.ScrollViewButtonsAndLabels;

import android.test.ActivityInstrumentationTestCase;
import android.test.suitebuilder.annotation.LargeTest;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.Suppress;
import android.view.KeyEvent;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.view.KeyEvent;


public class ScrollViewButtonsAndLabelsTest
@@ -69,6 +67,9 @@ public class ScrollViewButtonsAndLabelsTest
        int offScreenIndex = findFirstButtonOffScreenTop2Bottom();
        Button firstButtonOffScreen = getActivity().getButton(offScreenIndex);

        getActivity().runOnUiThread(() -> getActivity().getButton(0).requestFocus());
        getInstrumentation().waitForIdleSync();

        for (int i = 0; i < offScreenIndex; i++) {
            sendKeys(KeyEvent.KEYCODE_DPAD_DOWN);
        }