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

Unified Diff: ui/message_center/message_center_impl_unittest.cc

Issue 1645843003: Implement Non-Closable Notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary property. Created 4 years, 10 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 | « ui/message_center/message_center_impl.cc ('k') | ui/message_center/notification.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/message_center_impl_unittest.cc
diff --git a/ui/message_center/message_center_impl_unittest.cc b/ui/message_center/message_center_impl_unittest.cc
index 2b405fe6de4566e50e8751a17815925ec6207453..bc3828bc99466eaa16c0727d42c07094da35123f 100644
--- a/ui/message_center/message_center_impl_unittest.cc
+++ b/ui/message_center/message_center_impl_unittest.cc
@@ -559,9 +559,10 @@ TEST_F(MessageCenterImplTest, TotalNotificationBlocker) {
EXPECT_TRUE(NotificationsContain(notifications, "id3"));
EXPECT_TRUE(NotificationsContain(notifications, "id4"));
- // RemoveAllVisibleNotifications should remove just visible notifications.
+ // Remove just visible notifications.
blocker.SetNotificationsEnabled(false);
- message_center()->RemoveAllVisibleNotifications(false /* by_user */);
+ message_center()->RemoveAllNotifications(
+ false /* by_user */, MessageCenter::RemoveType::NON_PINNED);
EXPECT_EQ(0u, message_center()->NotificationCount());
blocker.SetNotificationsEnabled(true);
EXPECT_EQ(2u, message_center()->NotificationCount());
@@ -571,9 +572,10 @@ TEST_F(MessageCenterImplTest, TotalNotificationBlocker) {
EXPECT_TRUE(NotificationsContain(notifications, "id3"));
EXPECT_FALSE(NotificationsContain(notifications, "id4"));
- // And RemoveAllNotifications should remove all.
+ // And remove all including invisible notifications.
blocker.SetNotificationsEnabled(false);
- message_center()->RemoveAllNotifications(false /* by_user */);
+ message_center()->RemoveAllNotifications(false /* by_user */,
+ MessageCenter::RemoveType::ALL);
EXPECT_EQ(0u, message_center()->NotificationCount());
}
« no previous file with comments | « ui/message_center/message_center_impl.cc ('k') | ui/message_center/notification.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698