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
This commit is contained in:
Robert Carr
2020-04-10 13:00:34 -07:00
parent 4d7fb0b4c2
commit 0b76b1c2d7

View File

@@ -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));