Loading packages/SystemUI/multivalentTests/src/com/android/systemui/qs/QSPanelControllerTest.kt +18 −5 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ import android.testing.TestableResources import android.view.ContextThemeWrapper import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import androidx.test.platform.app.InstrumentationRegistry import com.android.internal.logging.MetricsLogger import com.android.internal.logging.UiEventLogger import com.android.systemui.SysuiTestCase Loading @@ -27,6 +28,7 @@ import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController import com.android.systemui.tuner.TunerService import com.google.common.truth.Truth.assertThat import javax.inject.Provider import kotlinx.coroutines.flow.MutableStateFlow import org.junit.After import org.junit.Before import org.junit.Test Loading Loading @@ -116,12 +118,23 @@ class QSPanelControllerTest : SysuiTestCase() { @After fun tearDown() { InstrumentationRegistry.getInstrumentation().runOnMainSync { // Ensure destroy() is called on the main thread for `mJavaAdapterDisposableHandle` to // run properly. controller.destroy() } reset(mediaHost) } @Test fun onInit_setsMediaAsExpanded() { fun onInit_setsMediaAsExpanded() = InstrumentationRegistry.getInstrumentation().runOnMainSync { // Set up media carousel interactor if (SceneContainerFlag.isEnabled) { val mockStateFlow = MutableStateFlow(false) whenever(mediaCarouselInteractor.hasAnyMedia).thenReturn(mockStateFlow) } controller.onInit() verify(mediaHost).expansion = MediaHostState.EXPANDED Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/qs/QSPanelControllerTest.kt +18 −5 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ import android.testing.TestableResources import android.view.ContextThemeWrapper import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import androidx.test.platform.app.InstrumentationRegistry import com.android.internal.logging.MetricsLogger import com.android.internal.logging.UiEventLogger import com.android.systemui.SysuiTestCase Loading @@ -27,6 +28,7 @@ import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController import com.android.systemui.tuner.TunerService import com.google.common.truth.Truth.assertThat import javax.inject.Provider import kotlinx.coroutines.flow.MutableStateFlow import org.junit.After import org.junit.Before import org.junit.Test Loading Loading @@ -116,12 +118,23 @@ class QSPanelControllerTest : SysuiTestCase() { @After fun tearDown() { InstrumentationRegistry.getInstrumentation().runOnMainSync { // Ensure destroy() is called on the main thread for `mJavaAdapterDisposableHandle` to // run properly. controller.destroy() } reset(mediaHost) } @Test fun onInit_setsMediaAsExpanded() { fun onInit_setsMediaAsExpanded() = InstrumentationRegistry.getInstrumentation().runOnMainSync { // Set up media carousel interactor if (SceneContainerFlag.isEnabled) { val mockStateFlow = MutableStateFlow(false) whenever(mediaCarouselInteractor.hasAnyMedia).thenReturn(mockStateFlow) } controller.onInit() verify(mediaHost).expansion = MediaHostState.EXPANDED Loading