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

Commit 3825ed80 authored by ramindani's avatar ramindani
Browse files

Use camel case to name the tests

Rearrange SurfaceHolder callback methods

Test: atest ChoreographerTests
BUG: 258235754
Change-Id: I1b48c892096cc4ef9c2e2c438c23e5efa3e4c792
parent a1b06b61
Loading
Loading
Loading
Loading
+13 −14
Original line number Diff line number Diff line
@@ -76,13 +76,13 @@ public class AttachedChoreographerTest {
            mSurfaceHolder.addCallback(new SurfaceHolder.Callback() {

                @Override
                public void surfaceChanged(SurfaceHolder holder, int format, int width,
                        int height) {
                public void surfaceCreated(SurfaceHolder holder) {
                    mSurfaceCreationCountDown.countDown();
                }

                @Override
                public void surfaceCreated(SurfaceHolder holder) {
                    mSurfaceCreationCountDown.countDown();
                public void surfaceChanged(SurfaceHolder holder, int format, int width,
                        int height) {
                }

                @Override
@@ -91,7 +91,6 @@ public class AttachedChoreographerTest {
            });
        });


        UiDevice uiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());
        uiDevice.wakeUp();
        uiDevice.executeShellCommand("wm dismiss-keyguard");
@@ -127,7 +126,7 @@ public class AttachedChoreographerTest {
    }

    @Test
    public void test_create_choreographer() {
    public void testCreateChoreographer() {
        mScenario.onActivity(activity -> {
            if (waitForCountDown(mSurfaceCreationCountDown, /* timeoutInSeconds */ 1L)) {
                fail("Unable to create surface within 1 Second");
@@ -162,7 +161,7 @@ public class AttachedChoreographerTest {
    }

    @Test
    public void test_copy_surface_control() {
    public void testCopySurfaceControl() {
        mScenario.onActivity(activity -> {
            if (waitForCountDown(mSurfaceCreationCountDown, /* timeoutInSeconds */ 1L)) {
                fail("Unable to create surface within 1 Second");
@@ -195,7 +194,7 @@ public class AttachedChoreographerTest {
    }

    @Test
    public void test_mirror_surface_control() {
    public void testMirrorSurfaceControl() {
        mScenario.onActivity(activity -> {
            if (waitForCountDown(mSurfaceCreationCountDown, /* timeoutInSeconds */ 1L)) {
                fail("Unable to create surface within 1 Second");
@@ -227,7 +226,7 @@ public class AttachedChoreographerTest {
    }

    @Test
    public void test_postFrameCallback() {
    public void testPostFrameCallback() {
        mScenario.onActivity(activity -> {
            if (waitForCountDown(mSurfaceCreationCountDown, /* timeoutInSeconds */ 1L)) {
                fail("Unable to create surface within 1 Second");
@@ -252,7 +251,7 @@ public class AttachedChoreographerTest {
    }

    @Test
    public void test_postFrameCallbackDelayed() {
    public void testPostFrameCallbackDelayed() {
        mScenario.onActivity(activity -> {
            if (waitForCountDown(mSurfaceCreationCountDown, /* timeoutInSeconds */ 1L)) {
                fail("Unable to create surface within 1 Second");
@@ -279,7 +278,7 @@ public class AttachedChoreographerTest {
    }

    @Test
    public void test_postCallback() {
    public void testPostCallback() {
        mScenario.onActivity(activity -> {
            if (waitForCountDown(mSurfaceCreationCountDown, /* timeoutInSeconds */ 1L)) {
                fail("Unable to create surface within 1 Second");
@@ -305,7 +304,7 @@ public class AttachedChoreographerTest {
    }

    @Test
    public void test_postCallbackDelayed() {
    public void testPostCallbackDelayed() {
        mScenario.onActivity(activity -> {
            if (waitForCountDown(mSurfaceCreationCountDown, /* timeoutInSeconds */ 1L)) {
                fail("Unable to create surface within 1 Second");
@@ -331,7 +330,7 @@ public class AttachedChoreographerTest {
    }

    @Test
    public void test_postVsyncCallback() {
    public void testPostVsyncCallback() {
        mScenario.onActivity(activity -> {
            if (waitForCountDown(mSurfaceCreationCountDown, /* timeout */ 1L)) {
                fail("Unable to create surface within 1 Second");
@@ -355,7 +354,7 @@ public class AttachedChoreographerTest {
    }

    @Test
    public void test_ChoreographerDivisorRefreshRate() {
    public void testChoreographerDivisorRefreshRate() {
        for (int divisor : new int[]{2, 3}) {
            CountDownLatch continueLatch = new CountDownLatch(1);
            mScenario.onActivity(activity -> {