| 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 766b8798ca22a516de0543f4dc8864fbd689d43d..c441ca7b43b06de52ed68344317fb8e7597b8352 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
|
| @@ -13,6 +13,8 @@ import org.chromium.base.test.util.AdvancedMockContext;
|
| import org.chromium.base.test.util.Feature;
|
| import org.chromium.content.browser.DownloadInfo;
|
|
|
| +import java.util.UUID;
|
| +
|
| /**
|
| * Tests of {@link SystemDownloadNotifier}.
|
| */
|
| @@ -67,7 +69,8 @@ public class SystemDownloadNotifierTest extends InstrumentationTestCase {
|
| @SmallTest
|
| @Feature({"Download"})
|
| public void testNotificationNotHandledUntilServiceConnection() {
|
| - DownloadInfo info = new DownloadInfo.Builder().setDownloadId(1).build();
|
| + DownloadInfo info = new DownloadInfo.Builder()
|
| + .setDownloadGuid(UUID.randomUUID().toString()).setNotificationId(1).build();
|
| mDownloadNotifier.notifyDownloadProgress(info, 1L);
|
| assertTrue(mDownloadNotifier.mStarted);
|
|
|
| @@ -83,10 +86,12 @@ public class SystemDownloadNotifierTest extends InstrumentationTestCase {
|
| @Feature({"Download"})
|
| public void testServiceStoppedWhenAllDownloadsFinish() {
|
| onServiceConnected();
|
| - DownloadInfo info = new DownloadInfo.Builder().setDownloadId(1).build();
|
| + DownloadInfo info = new DownloadInfo.Builder()
|
| + .setDownloadGuid(UUID.randomUUID().toString()).setNotificationId(1).build();
|
| mDownloadNotifier.notifyDownloadProgress(info, 1L);
|
| assertTrue(mDownloadNotifier.mStarted);
|
| - DownloadInfo info2 = new DownloadInfo.Builder().setDownloadId(2).build();
|
| + DownloadInfo info2 = new DownloadInfo.Builder()
|
| + .setDownloadGuid(UUID.randomUUID().toString()).setNotificationId(2).build();
|
| mDownloadNotifier.notifyDownloadProgress(info2, 1L);
|
|
|
| mDownloadNotifier.notifyDownloadFailed(info);
|
|
|