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

Commit cebb2882 authored by Seigo Nonaka's avatar Seigo Nonaka Committed by Android (Google) Code Review
Browse files

Merge "Fix test failure due to out of UI thread runnning."

parents f499c2f2 36e0f128
Loading
Loading
Loading
Loading
+15 −15
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@ import android.perftests.utils.PerfStatusReporter;
import android.perftests.utils.StubActivity;
import android.support.test.filters.LargeTest;
import android.support.test.runner.AndroidJUnit4;
import android.support.test.annotation.UiThreadTest;
import android.support.test.rule.ActivityTestRule;
import android.support.test.InstrumentationRegistry;

@@ -106,8 +105,8 @@ public class EditTextLongTextPerfTest {
    }

    @Test
    @UiThreadTest
    public void testEditText() {
    public void testEditText() throws Throwable {
        mActivityRule.runOnUiThread(() -> {
            BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
            final EditText editText = setupEditText();
            final KeyEvent keyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_ENTER);
@@ -121,5 +120,6 @@ public class EditTextLongTextPerfTest {
                    editText.updateDisplayListIfDirty();
                }
            }
        });
    }
}