Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/ViewConfigCoordinatorTest.kt +20 −12 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.keyguard.KeyguardUpdateMonitor import com.android.keyguard.KeyguardUpdateMonitorCallback import com.android.systemui.Flags import com.android.systemui.SysuiTestCase import com.android.systemui.statusbar.NotificationLockscreenUserManager import com.android.systemui.statusbar.NotificationLockscreenUserManager.UserChangedListener Loading Loading @@ -64,7 +65,8 @@ class ViewConfigCoordinatorTest : SysuiTestCase() { fun setUp() { whenever(pipeline.allNotifs).thenReturn(listOf(entry)) whenever(entry.row).thenReturn(row) coordinator = ViewConfigCoordinator( coordinator = ViewConfigCoordinator( configurationController, lockscreenUserManager, gutsManager, Loading Loading @@ -95,7 +97,7 @@ class ViewConfigCoordinatorTest : SysuiTestCase() { fun themeChangePropagatesToEntry() { configurationListener.onThemeChanged() verify(entry).onDensityOrFontScaleChanged() verify(entry).areGutsExposed() checkGutsExposedCalled() verifyNoMoreInteractions(entry, row) } Loading @@ -103,7 +105,7 @@ class ViewConfigCoordinatorTest : SysuiTestCase() { fun densityChangePropagatesToEntry() { configurationListener.onDensityOrFontScaleChanged() verify(entry).onDensityOrFontScaleChanged() verify(entry).areGutsExposed() checkGutsExposedCalled() verifyNoMoreInteractions(entry, row) } Loading @@ -127,7 +129,7 @@ class ViewConfigCoordinatorTest : SysuiTestCase() { verify(entry).row verify(row).onUiModeChanged() verify(entry).onDensityOrFontScaleChanged() verify(entry).areGutsExposed() checkGutsExposedCalled() verifyNoMoreInteractions(entry, row) clearInvocations(entry, row) Loading Loading @@ -158,7 +160,7 @@ class ViewConfigCoordinatorTest : SysuiTestCase() { verify(entry).row verify(row).onUiModeChanged() verify(entry).onDensityOrFontScaleChanged() verify(entry).areGutsExposed() checkGutsExposedCalled() verifyNoMoreInteractions(entry, row) clearInvocations(entry, row) Loading Loading @@ -194,8 +196,14 @@ class ViewConfigCoordinatorTest : SysuiTestCase() { verify(entry).row verify(row).onUiModeChanged() verify(entry).onDensityOrFontScaleChanged() verify(entry).areGutsExposed() checkGutsExposedCalled() verifyNoMoreInteractions(entry, row) clearInvocations(entry, row) } private fun checkGutsExposedCalled() { if (!Flags.notificationUndoGutsOnConfigChanged()) { verify(entry).areGutsExposed() } } } Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/ViewConfigCoordinatorTest.kt +20 −12 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.keyguard.KeyguardUpdateMonitor import com.android.keyguard.KeyguardUpdateMonitorCallback import com.android.systemui.Flags import com.android.systemui.SysuiTestCase import com.android.systemui.statusbar.NotificationLockscreenUserManager import com.android.systemui.statusbar.NotificationLockscreenUserManager.UserChangedListener Loading Loading @@ -64,7 +65,8 @@ class ViewConfigCoordinatorTest : SysuiTestCase() { fun setUp() { whenever(pipeline.allNotifs).thenReturn(listOf(entry)) whenever(entry.row).thenReturn(row) coordinator = ViewConfigCoordinator( coordinator = ViewConfigCoordinator( configurationController, lockscreenUserManager, gutsManager, Loading Loading @@ -95,7 +97,7 @@ class ViewConfigCoordinatorTest : SysuiTestCase() { fun themeChangePropagatesToEntry() { configurationListener.onThemeChanged() verify(entry).onDensityOrFontScaleChanged() verify(entry).areGutsExposed() checkGutsExposedCalled() verifyNoMoreInteractions(entry, row) } Loading @@ -103,7 +105,7 @@ class ViewConfigCoordinatorTest : SysuiTestCase() { fun densityChangePropagatesToEntry() { configurationListener.onDensityOrFontScaleChanged() verify(entry).onDensityOrFontScaleChanged() verify(entry).areGutsExposed() checkGutsExposedCalled() verifyNoMoreInteractions(entry, row) } Loading @@ -127,7 +129,7 @@ class ViewConfigCoordinatorTest : SysuiTestCase() { verify(entry).row verify(row).onUiModeChanged() verify(entry).onDensityOrFontScaleChanged() verify(entry).areGutsExposed() checkGutsExposedCalled() verifyNoMoreInteractions(entry, row) clearInvocations(entry, row) Loading Loading @@ -158,7 +160,7 @@ class ViewConfigCoordinatorTest : SysuiTestCase() { verify(entry).row verify(row).onUiModeChanged() verify(entry).onDensityOrFontScaleChanged() verify(entry).areGutsExposed() checkGutsExposedCalled() verifyNoMoreInteractions(entry, row) clearInvocations(entry, row) Loading Loading @@ -194,8 +196,14 @@ class ViewConfigCoordinatorTest : SysuiTestCase() { verify(entry).row verify(row).onUiModeChanged() verify(entry).onDensityOrFontScaleChanged() verify(entry).areGutsExposed() checkGutsExposedCalled() verifyNoMoreInteractions(entry, row) clearInvocations(entry, row) } private fun checkGutsExposedCalled() { if (!Flags.notificationUndoGutsOnConfigChanged()) { verify(entry).areGutsExposed() } } }