From fdae52974a8e3072547237ce25f587f8f7f99779 Mon Sep 17 00:00:00 2001 From: Beverly Tai Date: Wed, 7 Nov 2018 14:15:10 +0000 Subject: [PATCH] Revert "Temporarily disable ZenModeFiltering tests" This reverts commit c85c9c5748a3e6a7132a95d10384985d3d5852cb. Reason for revert: Breakage should be fixed in ag/5457346 Change-Id: I1117bc81999022e147926f61d371bceec8d7a174 --- .../server/notification/ZenModeFilteringTest.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/services/tests/uiservicestests/src/com/android/server/notification/ZenModeFilteringTest.java b/services/tests/uiservicestests/src/com/android/server/notification/ZenModeFilteringTest.java index ae0e35b80dd25..6c125d1648f33 100644 --- a/services/tests/uiservicestests/src/com/android/server/notification/ZenModeFilteringTest.java +++ b/services/tests/uiservicestests/src/com/android/server/notification/ZenModeFilteringTest.java @@ -31,9 +31,11 @@ import static org.mockito.Mockito.when; import android.app.Notification; import android.app.NotificationChannel; +import android.app.NotificationManager; import android.app.NotificationManager.Policy; import android.media.AudioAttributes; import android.service.notification.StatusBarNotification; +import android.service.notification.ZenModeConfig; import android.test.suitebuilder.annotation.SmallTest; import android.testing.AndroidTestingRunner; import android.testing.TestableLooper; @@ -43,7 +45,6 @@ import com.android.internal.util.NotificationMessagingUtil; import com.android.server.UiServiceTestCase; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -74,7 +75,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { return new NotificationRecord(mContext, sbn, c); } - @Ignore @Test public void testIsMessage() { NotificationRecord r = getNotificationRecord(); @@ -86,7 +86,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertFalse(mZenModeFiltering.isMessage(r)); } - @Ignore @Test public void testIsAlarm() { NotificationChannel c = mock(NotificationChannel.class); @@ -101,7 +100,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertTrue(mZenModeFiltering.isAlarm(r)); } - @Ignore @Test public void testIsAlarm_wrongCategory() { NotificationRecord r = getNotificationRecord(); @@ -109,7 +107,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertFalse(mZenModeFiltering.isAlarm(r)); } - @Ignore @Test public void testIsAlarm_wrongUsage() { NotificationChannel c = mock(NotificationChannel.class); @@ -120,7 +117,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertFalse(mZenModeFiltering.isAlarm(r)); } - @Ignore @Test public void testSuppressDNDInfo_yes_VisEffectsAllowed() { NotificationRecord r = getNotificationRecord(); @@ -132,7 +128,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertTrue(mZenModeFiltering.shouldIntercept(ZEN_MODE_IMPORTANT_INTERRUPTIONS, policy, r)); } - @Ignore @Test public void testSuppressDNDInfo_yes_WrongId() { NotificationRecord r = getNotificationRecord(); @@ -143,7 +138,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertTrue(mZenModeFiltering.shouldIntercept(ZEN_MODE_IMPORTANT_INTERRUPTIONS, policy, r)); } - @Ignore @Test public void testSuppressDNDInfo_yes_WrongPackage() { NotificationRecord r = getNotificationRecord(); @@ -154,7 +148,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertTrue(mZenModeFiltering.shouldIntercept(ZEN_MODE_IMPORTANT_INTERRUPTIONS, policy, r)); } - @Ignore @Test public void testSuppressDNDInfo_no() { NotificationRecord r = getNotificationRecord(); @@ -167,7 +160,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertFalse(mZenModeFiltering.shouldIntercept(ZEN_MODE_NO_INTERRUPTIONS, policy, r)); } - @Ignore @Test public void testSuppressAnything_yes_ZenModeOff() { NotificationRecord r = getNotificationRecord(); @@ -177,7 +169,6 @@ public class ZenModeFilteringTest extends UiServiceTestCase { assertFalse(mZenModeFiltering.shouldIntercept(ZEN_MODE_OFF, policy, r)); } - @Ignore @Test public void testSuppressAnything_bypass_ZenModeOn() { NotificationRecord r = getNotificationRecord();