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

Unified Diff: ash/system/web_notification/web_notification_tray_unittest.cc

Issue 324583002: The 1st patch to disambiguate message center notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 6 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: ash/system/web_notification/web_notification_tray_unittest.cc
diff --git a/ash/system/web_notification/web_notification_tray_unittest.cc b/ash/system/web_notification/web_notification_tray_unittest.cc
index eaf9d06a1d0177d3d25d368b17b11336288f48d7..ff7666c1f2c16cfa0247a98b14f5214b03908250 100644
--- a/ash/system/web_notification/web_notification_tray_unittest.cc
+++ b/ash/system/web_notification/web_notification_tray_unittest.cc
@@ -157,27 +157,27 @@ TEST_F(WebNotificationTrayTest, WebNotifications) {
// Add a notification.
AddNotification("test_id1");
EXPECT_EQ(1u, GetMessageCenter()->NotificationCount());
- EXPECT_TRUE(GetMessageCenter()->HasNotification("test_id1"));
+ EXPECT_TRUE(GetMessageCenter()->FindVisibleNotificationById("test_id1"));
AddNotification("test_id2");
AddNotification("test_id2");
EXPECT_EQ(2u, GetMessageCenter()->NotificationCount());
- EXPECT_TRUE(GetMessageCenter()->HasNotification("test_id2"));
+ EXPECT_TRUE(GetMessageCenter()->FindVisibleNotificationById("test_id2"));
// Ensure that updating a notification does not affect the count.
UpdateNotification("test_id2", "test_id3");
UpdateNotification("test_id3", "test_id3");
EXPECT_EQ(2u, GetMessageCenter()->NotificationCount());
- EXPECT_FALSE(GetMessageCenter()->HasNotification("test_id2"));
+ EXPECT_FALSE(GetMessageCenter()->FindVisibleNotificationById("test_id2"));
// Ensure that Removing the first notification removes it from the tray.
RemoveNotification("test_id1");
- EXPECT_FALSE(GetMessageCenter()->HasNotification("test_id1"));
+ EXPECT_FALSE(GetMessageCenter()->FindVisibleNotificationById("test_id1"));
EXPECT_EQ(1u, GetMessageCenter()->NotificationCount());
// Remove the remianing notification.
RemoveNotification("test_id3");
EXPECT_EQ(0u, GetMessageCenter()->NotificationCount());
- EXPECT_FALSE(GetMessageCenter()->HasNotification("test_id3"));
+ EXPECT_FALSE(GetMessageCenter()->FindVisibleNotificationById("test_id3"));
}
TEST_F(WebNotificationTrayTest, WebNotificationPopupBubble) {

Powered by Google App Engine
This is Rietveld 408576698