Index: ui/message_center/notification_list_unittest.cc |
diff --git a/ui/message_center/notification_list_unittest.cc b/ui/message_center/notification_list_unittest.cc |
index 8aaaa084cd8fe6ad5a46aaa26f43e35112c7156a..44053395c4a494b2b22a7580cc26c54835668c5a 100644 |
--- a/ui/message_center/notification_list_unittest.cc |
+++ b/ui/message_center/notification_list_unittest.cc |
@@ -14,7 +14,6 @@ |
#include "base/strings/utf_string_conversions.h" |
#include "base/values.h" |
#include "testing/gtest/include/gtest/gtest.h" |
-#include "ui/message_center/fake_message_center.h" |
#include "ui/message_center/message_center_style.h" |
#include "ui/message_center/notification_blocker.h" |
#include "ui/message_center/notification_types.h" |
@@ -30,7 +29,7 @@ |
~NotificationListTest() override {} |
void SetUp() override { |
- notification_list_.reset(new NotificationList(new FakeMessageCenter())); |
+ notification_list_.reset(new NotificationList()); |
counter_ = 0; |
} |
@@ -163,8 +162,9 @@ |
ASSERT_EQ(1u, notification_list()->UnreadCount(blockers())); |
ASSERT_EQ(1u, GetPopupCounts()); |
- // Resets the unread count and popup counts. |
- notification_list()->SetNotificationsShown(blockers(), NULL); |
+ // Make the message center visible. It resets the unread count and popup |
+ // counts. |
+ notification_list()->SetMessageCenterVisible(true, NULL); |
ASSERT_EQ(0u, notification_list()->UnreadCount(blockers())); |
ASSERT_EQ(0u, GetPopupCounts()); |
} |
@@ -309,7 +309,8 @@ |
EXPECT_EQ(kMaxVisiblePopupNotifications, GetPopupCounts()); |
// Low priority: not visible to popups. |
- notification_list()->SetNotificationsShown(blockers(), NULL); |
+ notification_list()->SetMessageCenterVisible(true, NULL); |
+ notification_list()->SetMessageCenterVisible(false, NULL); |
EXPECT_EQ(0u, notification_list()->UnreadCount(blockers())); |
AddPriorityNotification(LOW_PRIORITY); |
EXPECT_EQ(kMaxVisiblePopupNotifications + 2, |
@@ -367,7 +368,8 @@ |
notification_list()->MarkSinglePopupAsShown(normal_id, false); |
notification_list()->MarkSinglePopupAsShown(system_id, false); |
- notification_list()->SetNotificationsShown(blockers(), NULL); |
+ notification_list()->SetMessageCenterVisible(true, NULL); |
+ notification_list()->SetMessageCenterVisible(false, NULL); |
EXPECT_EQ(1u, GetPopupCounts()); |
// Mark as read -- emulation of mouse click. |