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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest.java

Issue 2781873002: Properly clean up notification on download open (Closed)
Patch Set: More rebase bugs Created 3 years, 9 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
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest.java
index 9923c951e7751e28ac1ce97b13d33c11dd4ebb8f..27f8ce82117c3ccc8029ce08245c0c6041a10482 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadNotificationServiceTest.java
@@ -308,6 +308,14 @@ public class DownloadNotificationServiceTest extends
service.notifyDownloadCanceled(id3);
assertEquals(2, getService().getNotificationIds().size());
assertFalse(getService().getNotificationIds().contains(lastNotificationId));
+
+ ContentId id4 = LegacyHelpers.buildLegacyContentId(false, UUID.randomUUID().toString());
+ service.notifyDownloadSuccessful(id4, "/path/to/success", "success", 100L, false, false);
+ assertEquals(3, getService().getNotificationIds().size());
+ int nextNotificationId = getService().getLastAddedNotificationId();
+ service.cancelNotification(nextNotificationId, id4);
+ assertEquals(2, getService().getNotificationIds().size());
+ assertFalse(getService().getNotificationIds().contains(nextNotificationId));
}
/**
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698