| Index: chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/notifications/MockNotificationManagerProxy.java
|
| diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/notifications/MockNotificationManagerProxy.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/notifications/MockNotificationManagerProxy.java
|
| index bd9b9b7782419a4368897615a657806b6f17dd7d..44a86857cdefb68867b196b0ee9d85c084554e3c 100644
|
| --- a/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/notifications/MockNotificationManagerProxy.java
|
| +++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/notifications/MockNotificationManagerProxy.java
|
| @@ -6,6 +6,7 @@ package org.chromium.chrome.test.util.browser.notifications;
|
|
|
| import android.app.Notification;
|
|
|
| +import org.chromium.chrome.browser.notifications.ChannelsInitializer;
|
| import org.chromium.chrome.browser.notifications.NotificationManagerProxy;
|
|
|
| import java.util.ArrayList;
|
| @@ -21,6 +22,8 @@ import javax.annotation.Nullable;
|
| */
|
| public class MockNotificationManagerProxy implements NotificationManagerProxy {
|
| private static final String KEY_SEPARATOR = ":";
|
| + private List<ChannelsInitializer.Channel> mChannels;
|
| + private List<ChannelsInitializer.ChannelGroup> mNotificationChannelGroups;
|
|
|
| /**
|
| * Holds a notification and the arguments passed to #notify and #cancel.
|
| @@ -45,6 +48,8 @@ public class MockNotificationManagerProxy implements NotificationManagerProxy {
|
| public MockNotificationManagerProxy() {
|
| mNotifications = new LinkedHashMap<>();
|
| mMutationCount = 0;
|
| + mChannels = new ArrayList<>();
|
| + mNotificationChannelGroups = new ArrayList<>();
|
| }
|
|
|
| /**
|
| @@ -91,6 +96,24 @@ public class MockNotificationManagerProxy implements NotificationManagerProxy {
|
| }
|
|
|
| @Override
|
| + public void createNotificationChannel(ChannelsInitializer.Channel channel) {
|
| + mChannels.add(channel);
|
| + }
|
| +
|
| + public List<ChannelsInitializer.Channel> getChannels() {
|
| + return mChannels;
|
| + }
|
| +
|
| + @Override
|
| + public void createNotificationChannelGroup(ChannelsInitializer.ChannelGroup channelGroup) {
|
| + mNotificationChannelGroups.add(channelGroup);
|
| + }
|
| +
|
| + public List<ChannelsInitializer.ChannelGroup> getNotificationChannelGroups() {
|
| + return mNotificationChannelGroups;
|
| + }
|
| +
|
| + @Override
|
| public void notify(int id, Notification notification) {
|
| notify(null /* tag */, id, notification);
|
| }
|
|
|