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

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

Issue 2832493002: [Android O] Only delete legacy notification channels on upgrade (Closed)
Patch Set: rebase 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/ChannelDefinitionsTest.java
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/notifications/ChannelDefinitionsTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/notifications/ChannelDefinitionsTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..26e409881258d96769444c96d7d17fe41d8c0b0e
--- /dev/null
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/notifications/ChannelDefinitionsTest.java
@@ -0,0 +1,27 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.notifications;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.everyItem;
+import static org.hamcrest.Matchers.isIn;
+import static org.hamcrest.Matchers.not;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.BlockJUnit4ClassRunner;
+
+/**
+ * Java unit tests for ChannelDefinitions.
+ */
+@RunWith(BlockJUnit4ClassRunner.class)
+public class ChannelDefinitionsTest {
+ @Test
+ public void testNoOverlapBetweenStartupAndLegacyChannelIds() throws Exception {
+ ChannelDefinitions channelDefinitions = new ChannelDefinitions();
+ assertThat(channelDefinitions.getStartupChannelIds(),
+ everyItem(not(isIn(channelDefinitions.getLegacyChannelIds()))));
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698