Loading packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardStateCallbackInteractorTest.kt +1 −2 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import org.mockito.kotlin.verify @SmallTest @RunWith(AndroidJUnit4::class) @EnableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR) class KeyguardStateCallbackInteractorTest : SysuiTestCase() { private val kosmos = testKosmos() Loading Loading @@ -81,7 +82,6 @@ class KeyguardStateCallbackInteractorTest : SysuiTestCase() { } @Test @EnableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR) fun test_lockscreenVisibility_notifyDismissSucceeded_ifNotVisible() = testScope.runTest { underTest.addCallback(callback) Loading Loading @@ -109,7 +109,6 @@ class KeyguardStateCallbackInteractorTest : SysuiTestCase() { } @Test @EnableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR) fun test_lockscreenVisibility_reportsKeyguardShowingChanged() = testScope.runTest { underTest.addCallback(callback) Loading packages/SystemUI/multivalentTests/src/com/android/systemui/shade/display/StatusBarTouchShadeDisplayPolicyTest.kt +3 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.shade.display import android.platform.test.annotations.EnableFlags import android.view.Display import android.view.Display.TYPE_EXTERNAL import android.view.MotionEvent Loading @@ -31,6 +32,7 @@ import com.android.systemui.kosmos.useUnconfinedTestDispatcher import com.android.systemui.shade.data.repository.statusBarTouchShadeDisplayPolicy import com.android.systemui.shade.domain.interactor.notificationElement import com.android.systemui.shade.domain.interactor.qsElement import com.android.systemui.shade.shared.flag.ShadeWindowGoesAround import com.android.systemui.testKosmos import com.google.common.truth.Truth.assertThat import kotlin.test.Test Loading @@ -41,6 +43,7 @@ import org.mockito.kotlin.mock @SmallTest @RunWith(AndroidJUnit4::class) @EnableFlags(ShadeWindowGoesAround.FLAG_NAME) class StatusBarTouchShadeDisplayPolicyTest : SysuiTestCase() { private val kosmos = testKosmos().useUnconfinedTestDispatcher() private val testScope = kosmos.testScope Loading packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeDisplaysInteractorTest.kt +3 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.systemui.shade.domain.interactor import android.content.res.Configuration import android.content.res.mockResources import android.platform.test.annotations.EnableFlags import android.view.Display import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest Loading @@ -28,6 +29,7 @@ import com.android.systemui.kosmos.testScope import com.android.systemui.kosmos.useUnconfinedTestDispatcher import com.android.systemui.scene.ui.view.mockShadeRootView import com.android.systemui.shade.data.repository.fakeShadeDisplaysRepository import com.android.systemui.shade.shared.flag.ShadeWindowGoesAround import com.android.systemui.statusbar.notification.data.repository.activeNotificationListRepository import com.android.systemui.statusbar.notification.data.repository.setActiveNotifs import com.android.systemui.statusbar.notification.row.notificationRebindingTracker Loading @@ -48,6 +50,7 @@ import org.mockito.kotlin.whenever @RunWith(AndroidJUnit4::class) @SmallTest @EnableFlags(ShadeWindowGoesAround.FLAG_NAME) class ShadeDisplaysInteractorTest : SysuiTestCase() { private val kosmos = testKosmos().useUnconfinedTestDispatcher() Loading packages/SystemUI/multivalentTests/src/com/android/systemui/shared/plugins/PluginInstanceTest.java +8 −4 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import androidx.test.filters.SmallTest; import androidx.test.runner.AndroidJUnit4; import com.android.systemui.SysuiTestCase; import com.android.systemui.log.LogAssertKt; import com.android.systemui.plugins.Plugin; import com.android.systemui.plugins.PluginLifecycleManager; import com.android.systemui.plugins.PluginListener; Loading Loading @@ -138,11 +139,12 @@ public class PluginInstanceTest extends SysuiTestCase { mVersionCheckResult = false; assertFalse(mPluginInstance.hasError()); mPluginInstanceFactory.create( mContext, mAppInfo, wrongVersionTestPluginComponentName, TestPlugin.class, mPluginListener); LogAssertKt.assertLogsWtf(()-> { mPluginInstance.onCreate(); }); assertTrue(mPluginInstance.hasError()); assertNull(mPluginInstance.getPlugin()); } Loading Loading @@ -193,8 +195,10 @@ public class PluginInstanceTest extends SysuiTestCase { mPluginInstance.onCreate(); assertFalse(mPluginInstance.hasError()); LogAssertKt.assertLogsWtf(()-> { Object result = mPluginInstance.getPlugin().methodThrowsError(); assertNotNull(result); // Wrapper function should return non-null; }); assertTrue(mPluginInstance.hasError()); assertNull(mPluginInstance.getPlugin()); } Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/domain/interactor/SingleNotificationChipInteractorTest.kt +2 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import com.android.systemui.kosmos.collectLastValue import com.android.systemui.kosmos.runTest import com.android.systemui.kosmos.useUnconfinedTestDispatcher import com.android.systemui.statusbar.StatusBarIconView import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips import com.android.systemui.statusbar.core.StatusBarConnectedDisplays import com.android.systemui.statusbar.notification.data.model.activeNotificationModel import com.android.systemui.statusbar.notification.promoted.shared.model.PromotedNotificationContentModel Loading @@ -39,6 +40,7 @@ import org.mockito.kotlin.mock @SmallTest @RunWith(AndroidJUnit4::class) @EnableFlags(StatusBarNotifChips.FLAG_NAME) class SingleNotificationChipInteractorTest : SysuiTestCase() { private val kosmos = testKosmos().useUnconfinedTestDispatcher() val factory = kosmos.singleNotificationChipInteractorFactory Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardStateCallbackInteractorTest.kt +1 −2 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import org.mockito.kotlin.verify @SmallTest @RunWith(AndroidJUnit4::class) @EnableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR) class KeyguardStateCallbackInteractorTest : SysuiTestCase() { private val kosmos = testKosmos() Loading Loading @@ -81,7 +82,6 @@ class KeyguardStateCallbackInteractorTest : SysuiTestCase() { } @Test @EnableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR) fun test_lockscreenVisibility_notifyDismissSucceeded_ifNotVisible() = testScope.runTest { underTest.addCallback(callback) Loading Loading @@ -109,7 +109,6 @@ class KeyguardStateCallbackInteractorTest : SysuiTestCase() { } @Test @EnableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR) fun test_lockscreenVisibility_reportsKeyguardShowingChanged() = testScope.runTest { underTest.addCallback(callback) Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/shade/display/StatusBarTouchShadeDisplayPolicyTest.kt +3 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.shade.display import android.platform.test.annotations.EnableFlags import android.view.Display import android.view.Display.TYPE_EXTERNAL import android.view.MotionEvent Loading @@ -31,6 +32,7 @@ import com.android.systemui.kosmos.useUnconfinedTestDispatcher import com.android.systemui.shade.data.repository.statusBarTouchShadeDisplayPolicy import com.android.systemui.shade.domain.interactor.notificationElement import com.android.systemui.shade.domain.interactor.qsElement import com.android.systemui.shade.shared.flag.ShadeWindowGoesAround import com.android.systemui.testKosmos import com.google.common.truth.Truth.assertThat import kotlin.test.Test Loading @@ -41,6 +43,7 @@ import org.mockito.kotlin.mock @SmallTest @RunWith(AndroidJUnit4::class) @EnableFlags(ShadeWindowGoesAround.FLAG_NAME) class StatusBarTouchShadeDisplayPolicyTest : SysuiTestCase() { private val kosmos = testKosmos().useUnconfinedTestDispatcher() private val testScope = kosmos.testScope Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeDisplaysInteractorTest.kt +3 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.systemui.shade.domain.interactor import android.content.res.Configuration import android.content.res.mockResources import android.platform.test.annotations.EnableFlags import android.view.Display import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest Loading @@ -28,6 +29,7 @@ import com.android.systemui.kosmos.testScope import com.android.systemui.kosmos.useUnconfinedTestDispatcher import com.android.systemui.scene.ui.view.mockShadeRootView import com.android.systemui.shade.data.repository.fakeShadeDisplaysRepository import com.android.systemui.shade.shared.flag.ShadeWindowGoesAround import com.android.systemui.statusbar.notification.data.repository.activeNotificationListRepository import com.android.systemui.statusbar.notification.data.repository.setActiveNotifs import com.android.systemui.statusbar.notification.row.notificationRebindingTracker Loading @@ -48,6 +50,7 @@ import org.mockito.kotlin.whenever @RunWith(AndroidJUnit4::class) @SmallTest @EnableFlags(ShadeWindowGoesAround.FLAG_NAME) class ShadeDisplaysInteractorTest : SysuiTestCase() { private val kosmos = testKosmos().useUnconfinedTestDispatcher() Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/shared/plugins/PluginInstanceTest.java +8 −4 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import androidx.test.filters.SmallTest; import androidx.test.runner.AndroidJUnit4; import com.android.systemui.SysuiTestCase; import com.android.systemui.log.LogAssertKt; import com.android.systemui.plugins.Plugin; import com.android.systemui.plugins.PluginLifecycleManager; import com.android.systemui.plugins.PluginListener; Loading Loading @@ -138,11 +139,12 @@ public class PluginInstanceTest extends SysuiTestCase { mVersionCheckResult = false; assertFalse(mPluginInstance.hasError()); mPluginInstanceFactory.create( mContext, mAppInfo, wrongVersionTestPluginComponentName, TestPlugin.class, mPluginListener); LogAssertKt.assertLogsWtf(()-> { mPluginInstance.onCreate(); }); assertTrue(mPluginInstance.hasError()); assertNull(mPluginInstance.getPlugin()); } Loading Loading @@ -193,8 +195,10 @@ public class PluginInstanceTest extends SysuiTestCase { mPluginInstance.onCreate(); assertFalse(mPluginInstance.hasError()); LogAssertKt.assertLogsWtf(()-> { Object result = mPluginInstance.getPlugin().methodThrowsError(); assertNotNull(result); // Wrapper function should return non-null; }); assertTrue(mPluginInstance.hasError()); assertNull(mPluginInstance.getPlugin()); } Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/domain/interactor/SingleNotificationChipInteractorTest.kt +2 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import com.android.systemui.kosmos.collectLastValue import com.android.systemui.kosmos.runTest import com.android.systemui.kosmos.useUnconfinedTestDispatcher import com.android.systemui.statusbar.StatusBarIconView import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips import com.android.systemui.statusbar.core.StatusBarConnectedDisplays import com.android.systemui.statusbar.notification.data.model.activeNotificationModel import com.android.systemui.statusbar.notification.promoted.shared.model.PromotedNotificationContentModel Loading @@ -39,6 +40,7 @@ import org.mockito.kotlin.mock @SmallTest @RunWith(AndroidJUnit4::class) @EnableFlags(StatusBarNotifChips.FLAG_NAME) class SingleNotificationChipInteractorTest : SysuiTestCase() { private val kosmos = testKosmos().useUnconfinedTestDispatcher() val factory = kosmos.singleNotificationChipInteractorFactory Loading