| Index: chrome/android/javatests/src/org/chromium/chrome/browser/download/SystemDownloadNotifierTest.java
|
| diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/download/SystemDownloadNotifierTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/download/SystemDownloadNotifierTest.java
|
| index 3b13768e982352153c243f6d7fbf0abdba6b3d84..4f68aa96d15fc6bf8b494efc15435592dd24e9d5 100644
|
| --- a/chrome/android/javatests/src/org/chromium/chrome/browser/download/SystemDownloadNotifierTest.java
|
| +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/download/SystemDownloadNotifierTest.java
|
| @@ -38,6 +38,12 @@ public class SystemDownloadNotifierTest extends InstrumentationTestCase {
|
| void stopService() {
|
| mStarted = false;
|
| }
|
| +
|
| + @Override
|
| + void onSuccessNotificationShown(
|
| + final SystemDownloadNotifier.PendingNotificationInfo notificationInfo,
|
| + final int notificationId) {
|
| + }
|
| }
|
|
|
| @Override
|
| @@ -70,13 +76,12 @@ public class SystemDownloadNotifierTest extends InstrumentationTestCase {
|
| @Feature({"Download"})
|
| public void testNotificationNotHandledUntilServiceConnection() {
|
| DownloadInfo info = new DownloadInfo.Builder()
|
| - .setDownloadGuid(UUID.randomUUID().toString()).setNotificationId(1).build();
|
| + .setDownloadGuid(UUID.randomUUID().toString()).build();
|
| mDownloadNotifier.notifyDownloadProgress(info, 1L, true);
|
| assertTrue(mDownloadNotifier.mStarted);
|
|
|
| onServiceConnected();
|
| assertEquals(1, mService.getNotificationIds().size());
|
| - assertTrue(mService.getNotificationIds().contains(1));
|
| }
|
|
|
| /**
|
| @@ -87,16 +92,16 @@ public class SystemDownloadNotifierTest extends InstrumentationTestCase {
|
| public void testServiceStoppedWhenAllDownloadsFinish() {
|
| onServiceConnected();
|
| DownloadInfo info = new DownloadInfo.Builder()
|
| - .setDownloadGuid(UUID.randomUUID().toString()).setNotificationId(1).build();
|
| + .setDownloadGuid(UUID.randomUUID().toString()).build();
|
| mDownloadNotifier.notifyDownloadProgress(info, 1L, true);
|
| assertTrue(mDownloadNotifier.mStarted);
|
| DownloadInfo info2 = new DownloadInfo.Builder()
|
| - .setDownloadGuid(UUID.randomUUID().toString()).setNotificationId(2).build();
|
| + .setDownloadGuid(UUID.randomUUID().toString()).build();
|
| mDownloadNotifier.notifyDownloadProgress(info2, 1L, true);
|
|
|
| mDownloadNotifier.notifyDownloadFailed(info);
|
| assertTrue(mDownloadNotifier.mStarted);
|
| - mDownloadNotifier.notifyDownloadSuccessful(info2, null);
|
| + mDownloadNotifier.notifyDownloadSuccessful(info2, 100L, true, null);
|
| assertFalse(mDownloadNotifier.mStarted);
|
| }
|
| }
|
|
|