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

Unified Diff: chrome/android/junit/src/org/chromium/chrome/browser/notifications/ChannelsInitializerTest.java

Issue 2807213002: [Android O] Initialize channels on first launch/upgrade (Closed)
Patch Set: Initialize channels on first launch and upgrade Created 3 years, 8 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
Index: chrome/android/junit/src/org/chromium/chrome/browser/notifications/ChannelsInitializerTest.java
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/notifications/ChannelsInitializerTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/notifications/ChannelsInitializerTest.java
index 7628147bc771f26729c48d08a07c5aeffc605b07..f36ae9f84e59f963d05b4c7c3f3c836b7b2db03c 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/notifications/ChannelsInitializerTest.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/notifications/ChannelsInitializerTest.java
@@ -4,6 +4,7 @@
package org.chromium.chrome.browser.notifications;
+import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
@@ -70,4 +71,10 @@ public class ChannelsInitializerTest {
assertThat(group.mNameResId,
is(org.chromium.chrome.R.string.notification_category_group_general));
}
+
+ @Test
+ public void testInitializeStartupChannels() throws Exception {
+ mChannelsInitializer.initializeStartupChannels();
+ assertThat(mMockNotificationManager.getChannels().size(), is(greaterThan(0)));
+ }
}

Powered by Google App Engine
This is Rietveld 408576698