Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(661)

Unified Diff: chrome/android/junit/src/org/chromium/chrome/browser/media/ui/MediaNotificationManagerServiceLifecycleTest.java

Issue 2831223002: [Media>UI] Migrate media notification tests to JUnit tests (Closed)
Patch Set: fixed tests Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/junit/src/org/chromium/chrome/browser/media/ui/MediaNotificationManagerServiceLifecycleTest.java
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/media/ui/MediaNotificationManagerServiceLifecycleTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/media/ui/MediaNotificationManagerServiceLifecycleTest.java
index 6dad897f0c23308e3a5fb7bff2b00ac8d0e11157..64f6105ce61f84fb11f34e56948c95fda9877a3d 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/media/ui/MediaNotificationManagerServiceLifecycleTest.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/media/ui/MediaNotificationManagerServiceLifecycleTest.java
@@ -83,7 +83,7 @@ public class MediaNotificationManagerServiceLifecycleTest extends MediaNotificat
@Test
public void testProcessIntentWhenManagerIsNull() {
setUpService();
- MediaNotificationManager.setManagerForTesting(NOTIFICATION_ID, null);
+ MediaNotificationManager.setManagerForTesting(getNotificationId(), null);
assertFalse(mService.processIntent(new Intent()));
}
@@ -227,7 +227,7 @@ public class MediaNotificationManagerServiceLifecycleTest extends MediaNotificat
verify(mService).stopForeground(false);
// One of the invocations comes from |setUpService()|.
verify(MediaNotificationTestShadowNotificationManager.sMockObserver, times(2))
- .notify(eq(NOTIFICATION_ID), any(Notification.class));
+ .notify(eq(getNotificationId()), any(Notification.class));
}
@Test
@@ -238,7 +238,7 @@ public class MediaNotificationManagerServiceLifecycleTest extends MediaNotificat
getManager().mMediaNotificationInfo = mMediaNotificationInfoBuilder.build();
getManager().updateNotification();
- verify(mService).startForeground(eq(NOTIFICATION_ID), any(Notification.class));
+ verify(mService).startForeground(eq(getNotificationId()), any(Notification.class));
}
@Test
@@ -249,6 +249,6 @@ public class MediaNotificationManagerServiceLifecycleTest extends MediaNotificat
getManager().mMediaNotificationInfo = mMediaNotificationInfoBuilder.build();
getManager().updateNotification();
- verify(mService).startForeground(eq(NOTIFICATION_ID), any(Notification.class));
+ verify(mService).startForeground(eq(getNotificationId()), any(Notification.class));
}
}

Powered by Google App Engine
This is Rietveld 408576698