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

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

Issue 2619433003: Group Downloads notifications, and separate Incognito (Closed)
Patch Set: Comments Created 3 years, 11 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/notifications/NotificationConstants.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 d762e0bee3d8f58745cd718813e75336335d54d8..6f8fe64371cf8e996d538185a0c70881de8815b1 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
@@ -80,7 +80,7 @@ public class DownloadNotificationServiceTest extends
super.setupService();
SharedPreferences sharedPrefs = ContextUtils.getAppSharedPreferences();
SharedPreferences.Editor editor = sharedPrefs.edit();
- editor.remove(DownloadNotificationService.PENDING_DOWNLOAD_NOTIFICATIONS);
+ editor.remove(DownloadNotificationService.KEY_PENDING_DOWNLOAD_NOTIFICATIONS);
editor.apply();
super.tearDown();
}
@@ -148,7 +148,7 @@ public class DownloadNotificationServiceTest extends
SharedPreferences sharedPrefs = ContextUtils.getAppSharedPreferences();
SharedPreferences.Editor editor = sharedPrefs.edit();
editor.putStringSet(
- DownloadNotificationService.PENDING_DOWNLOAD_NOTIFICATIONS, notifications);
+ DownloadNotificationService.KEY_PENDING_DOWNLOAD_NOTIFICATIONS, notifications);
editor.apply();
startNotificationService();
assertTrue(scheduler.mScheduled);
@@ -195,7 +195,7 @@ public class DownloadNotificationServiceTest extends
SharedPreferences sharedPrefs = ContextUtils.getAppSharedPreferences();
SharedPreferences.Editor editor = sharedPrefs.edit();
editor.putStringSet(
- DownloadNotificationService.PENDING_DOWNLOAD_NOTIFICATIONS, notifications);
+ DownloadNotificationService.KEY_PENDING_DOWNLOAD_NOTIFICATIONS, notifications);
editor.apply();
startNotificationService();
assertFalse(scheduler.mScheduled);
@@ -223,15 +223,15 @@ public class DownloadNotificationServiceTest extends
ContextUtils.getAppSharedPreferences();
SharedPreferences.Editor editor = sharedPrefs.edit();
editor.putStringSet(
- DownloadNotificationService.PENDING_DOWNLOAD_NOTIFICATIONS, notifications);
+ DownloadNotificationService.KEY_PENDING_DOWNLOAD_NOTIFICATIONS, notifications);
editor.apply();
startNotificationService();
assertTrue(getService().isPaused());
assertEquals(2, getService().getNotificationIds().size());
assertTrue(getService().getNotificationIds().contains(1));
assertTrue(getService().getNotificationIds().contains(2));
- assertTrue(
- sharedPrefs.contains(DownloadNotificationService.PENDING_DOWNLOAD_NOTIFICATIONS));
+ assertTrue(sharedPrefs.contains(
+ DownloadNotificationService.KEY_PENDING_DOWNLOAD_NOTIFICATIONS));
}
/**
@@ -255,7 +255,7 @@ public class DownloadNotificationServiceTest extends
SharedPreferences sharedPrefs = ContextUtils.getAppSharedPreferences();
SharedPreferences.Editor editor = sharedPrefs.edit();
editor.putStringSet(
- DownloadNotificationService.PENDING_DOWNLOAD_NOTIFICATIONS, notifications);
+ DownloadNotificationService.KEY_PENDING_DOWNLOAD_NOTIFICATIONS, notifications);
editor.apply();
startNotificationService();
assertEquals(2, getService().getNotificationIds().size());
@@ -268,17 +268,17 @@ public class DownloadNotificationServiceTest extends
assertEquals(3, getService().getNotificationIds().size());
int lastNotificationId = getService().getLastAddedNotificationId();
Set<String> entries = DownloadManagerService.getStoredDownloadInfo(
- sharedPrefs, DownloadNotificationService.PENDING_DOWNLOAD_NOTIFICATIONS);
+ sharedPrefs, DownloadNotificationService.KEY_PENDING_DOWNLOAD_NOTIFICATIONS);
assertEquals(3, entries.size());
service.notifyDownloadSuccessful(guid1, "/path/to/success", "success", 100L, false, false);
entries = DownloadManagerService.getStoredDownloadInfo(
- sharedPrefs, DownloadNotificationService.PENDING_DOWNLOAD_NOTIFICATIONS);
+ sharedPrefs, DownloadNotificationService.KEY_PENDING_DOWNLOAD_NOTIFICATIONS);
assertEquals(2, entries.size());
service.notifyDownloadFailed(guid2, "failed");
entries = DownloadManagerService.getStoredDownloadInfo(
- sharedPrefs, DownloadNotificationService.PENDING_DOWNLOAD_NOTIFICATIONS);
+ sharedPrefs, DownloadNotificationService.KEY_PENDING_DOWNLOAD_NOTIFICATIONS);
assertEquals(1, entries.size());
service.notifyDownloadCanceled(guid3);
@@ -326,7 +326,7 @@ public class DownloadNotificationServiceTest extends
SharedPreferences sharedPrefs = ContextUtils.getAppSharedPreferences();
SharedPreferences.Editor editor = sharedPrefs.edit();
editor.putStringSet(
- DownloadNotificationService.PENDING_DOWNLOAD_NOTIFICATIONS, notifications);
+ DownloadNotificationService.KEY_PENDING_DOWNLOAD_NOTIFICATIONS, notifications);
editor.apply();
startNotificationService();
DownloadNotificationService service = bindNotificationService();
@@ -370,12 +370,12 @@ public class DownloadNotificationServiceTest extends
ContextUtils.getAppSharedPreferences();
SharedPreferences.Editor editor = sharedPrefs.edit();
editor.putStringSet(
- DownloadNotificationService.PENDING_DOWNLOAD_NOTIFICATIONS, notifications);
+ DownloadNotificationService.KEY_PENDING_DOWNLOAD_NOTIFICATIONS, notifications);
editor.apply();
startNotificationService();
assertTrue(getService().isPaused());
assertFalse(sharedPrefs.contains(
- DownloadNotificationService.PENDING_DOWNLOAD_NOTIFICATIONS));
+ DownloadNotificationService.KEY_PENDING_DOWNLOAD_NOTIFICATIONS));
}
@SmallTest
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationConstants.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698