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

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

Issue 2789083002: Properly clean up notification on download open (Closed)
Patch Set: 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 a41d5a4616568a7e2ccfbf39365b93a5e7c9e941..55020c75bf5803239d379e2de64070f6f2fc680d 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
@@ -302,6 +302,14 @@ public class DownloadNotificationServiceTest extends
service.notifyDownloadCanceled(guid3);
assertEquals(2, getService().getNotificationIds().size());
assertFalse(getService().getNotificationIds().contains(lastNotificationId));
+
+ String guid4 = UUID.randomUUID().toString();
+ service.notifyDownloadSuccessful(guid4, "/path/to/success", "success", 100L, false, false);
+ assertEquals(3, getService().getNotificationIds().size());
+ int nextNotificationId = getService().getLastAddedNotificationId();
+ service.cancelNotification(nextNotificationId, guid4);
+ 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