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

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: Addressed the comments 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
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..2ced2c36ee6d51d14a590b9b04e04bf31dd4090e 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::VISIBLE);
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());
}

Powered by Google App Engine
This is Rietveld 408576698