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

Commit aa735716 authored by Ats Jenk's avatar Ats Jenk
Browse files

Use Mockito.spy to fix studio

Use Mockito.spy for creating the spy to fix running tests from studio

Bug: 276747288
Test: atest WMShellMultivalentTestsOnDevice:com.android.wm.shell.bubbles.BubbleStackViewTest
Flag: EXEMPT test only
Change-Id: I45e94ac08411e2e999db15a3f7a1c2ae13ed621c
parent 5dbffb23
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import androidx.test.platform.app.InstrumentationRegistry
import com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn
import com.android.internal.logging.testing.UiEventLoggerFake
import com.android.internal.protolog.ProtoLog
import com.android.launcher3.icons.BubbleIconFactory
@@ -52,6 +51,7 @@ import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mockito
import org.mockito.kotlin.mock
import org.mockito.kotlin.verify
import java.util.concurrent.Semaphore
@@ -355,7 +355,7 @@ class BubbleStackViewTest {

    @Test
    fun removeFromWindow_stopMonitoringSwipeUpGesture() {
        spyOn(bubbleStackView)
        bubbleStackView = Mockito.spy(bubbleStackView)
        InstrumentationRegistry.getInstrumentation().runOnMainSync {
            // No way to add to window in the test environment right now so just pretend
            bubbleStackView.onDetachedFromWindow()