DO NOT MERGE Adding tests for updated EmptyShadeView logic am: e6fe1a0ef1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22912038 Change-Id: I369de9439c5c53397ea00ed8e0ab90e0acd3a619 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -294,6 +294,34 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase {
|
||||
/* notifVisibleInShade= */ false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdateEmptyShadeView_bouncerShowing_hideEmptyView() {
|
||||
when(mZenModeController.areNotificationsHiddenInShade()).thenReturn(false);
|
||||
mController.attach(mNotificationStackScrollLayout);
|
||||
|
||||
when(mCentralSurfaces.isBouncerShowing()).thenReturn(true);
|
||||
setupShowEmptyShadeViewState(true);
|
||||
reset(mNotificationStackScrollLayout);
|
||||
mController.updateShowEmptyShadeView();
|
||||
verify(mNotificationStackScrollLayout).updateEmptyShadeView(
|
||||
/* visible= */ false,
|
||||
/* areNotificationsHiddenInShade= */ false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdateEmptyShadeView_bouncerNotShowing_showEmptyView() {
|
||||
when(mZenModeController.areNotificationsHiddenInShade()).thenReturn(false);
|
||||
mController.attach(mNotificationStackScrollLayout);
|
||||
|
||||
when(mCentralSurfaces.isBouncerShowing()).thenReturn(false);
|
||||
setupShowEmptyShadeViewState(true);
|
||||
reset(mNotificationStackScrollLayout);
|
||||
mController.updateShowEmptyShadeView();
|
||||
verify(mNotificationStackScrollLayout).updateEmptyShadeView(
|
||||
/* visible= */ true,
|
||||
/* areNotificationsHiddenInShade= */ false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOnUserChange_verifySensitiveProfile() {
|
||||
when(mNotificationLockscreenUserManager.isAnyProfilePublicMode()).thenReturn(true);
|
||||
|
||||
Reference in New Issue
Block a user