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

Commit c62122a7 authored by Tenghui Zhu's avatar Tenghui Zhu Committed by Android (Google) Code Review
Browse files

Merge "Workaround the issue that parameterized test don't support @UiThreadTest"

parents ef0854a0 022113ad
Loading
Loading
Loading
Loading
+25 −23
Original line number Diff line number Diff line
@@ -78,7 +78,8 @@ public class LayoutPerfTest {

    @Test
    @UiThreadTest
    public void testLayoutPerf() {
    public void testLayoutPerf() throws Throwable {
        mActivityRule.runOnUiThread(() -> {
            assertTrue("We should be running on the main thread",
                    Looper.getMainLooper().getThread() == Thread.currentThread());
            assertTrue("We should be running on the main thread",
@@ -102,5 +103,6 @@ public class LayoutPerfTest {
                    viewGroup.layout(0, 0, viewGroup.getMeasuredWidth(), viewGroup.getMeasuredHeight());
                }
            }
        });
    }
}