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

Commit f44dd5ea authored by Johannes Gallmann's avatar Johannes Gallmann
Browse files

Fix WindowOnBackInvokedDispatcherTest flake

Bug: 369930834
Test: WindowOnBackInvokedDispatcherTest
Flag: EXEMPT test bugfix
Change-Id: I70b31951e409bf694c69bb10268357dddb32a60e
parent ca251a4b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -561,10 +561,12 @@ public class WindowOnBackInvokedDispatcherTest {
        waitForIdle();
        onBackCancelledCalled.await(1000, TimeUnit.MILLISECONDS);

        verify(mWindowSession, timeout(1000)).setOnBackInvokedCallbackInfo(Mockito.eq(mWindow),
                isNull());
        waitForIdle();
        // verify that onBackCancelled is called exactly once in this case
        assertEquals(0, onBackCancelledCalled.getCount());
        assertEquals(0, onBackInvokedCalled.get());
        verify(mWindowSession).setOnBackInvokedCallbackInfo(Mockito.eq(mWindow), isNull());
        assertFalse(mDispatcher.mProgressAnimator.isBackAnimationInProgress());
    }