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

Commit 0b76b1c2 authored by Robert Carr's avatar Robert Carr
Browse files

Fix WindowContainerThumbnailTest

A recent commit to WindowContainerThumbnail changed makeSurface
to makeChildSurface but the test was already marked as flaky and
so the CL was able to pass presubmit without updating the test.

Bug: 153708519
Test: WindowContainerThumbnailTest
Change-Id: Ic1ef7cb941b67f2f807d812a6a4cce82bdd917ac
parent 4d7fb0b4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.server.wm;

import static com.android.dx.mockito.inline.extended.ExtendedMockito.mock;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.when;
import static org.mockito.ArgumentMatchers.any;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
@@ -49,6 +50,7 @@ public class WindowContainerThumbnailTest extends WindowTestsBase {
                GraphicBuffer.USAGE_SW_READ_RARELY | GraphicBuffer.USAGE_SW_WRITE_NEVER);
        final ActivityRecord mockAr = mock(ActivityRecord.class);
        when(mockAr.getPendingTransaction()).thenReturn(new StubTransaction());
        when(mockAr.makeChildSurface(any())).thenReturn(new MockSurfaceControlBuilder());
        when(mockAr.makeSurface()).thenReturn(new MockSurfaceControlBuilder());
        return new WindowContainerThumbnail(new StubTransaction(), mockAr,
                buffer, false, mock(Surface.class), mock(SurfaceAnimator.class));