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

Commit 6f10fb57 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix test failures in AbsSwipeUpHandlerTestCase" into main

parents f0b80dad e7e752e0
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -80,8 +80,6 @@ public abstract class AbsSwipeUpHandlerTestCase<

    protected final Context mContext =
            InstrumentationRegistry.getInstrumentation().getTargetContext();
    protected final RecentsAnimationDeviceState mRecentsAnimationDeviceState =
            new RecentsAnimationDeviceState(mContext, true);
    protected final InputConsumerController mInputConsumerController =
            InputConsumerController.getRecentsAnimationInputConsumer();
    protected final ActivityManager.RunningTaskInfo mRunningTaskInfo =
@@ -114,6 +112,7 @@ public abstract class AbsSwipeUpHandlerTestCase<
            new Bundle());

    protected TaskAnimationManager mTaskAnimationManager;
    protected RecentsAnimationDeviceState mRecentsAnimationDeviceState;

    @Mock protected CONTAINER_INTERFACE mActivityInterface;
    @Mock protected ContextInitListener<?> mContextInitListener;
@@ -176,6 +175,12 @@ public abstract class AbsSwipeUpHandlerTestCase<
        }).when(recentsContainer).runOnBindToTouchInteractionService(any());
    }

    @Before
    public void setUpRecentsAnimationDeviceState() {
        runOnMainSync(() ->
                mRecentsAnimationDeviceState = new RecentsAnimationDeviceState(mContext, true));
    }

    @Test
    public void testInitWhenReady_registersActivityInitListener() {
        String reasonString = "because i said so";
@@ -306,8 +311,6 @@ public abstract class AbsSwipeUpHandlerTestCase<
    }

    private void onRecentsAnimationStart(SWIPE_HANDLER absSwipeUpHandler) {
        when(mActivityInterface.getOverviewWindowBounds(any(), any())).thenReturn(new Rect());

        runOnMainSync(() -> absSwipeUpHandler.onRecentsAnimationStart(
                mRecentsAnimationController, mRecentsAnimationTargets));
    }