Index: chrome/browser/ui/views/message_center/web_notification_tray_win_browsertest.cc |
diff --git a/chrome/browser/ui/views/message_center/web_notification_tray_win_browsertest.cc b/chrome/browser/ui/views/message_center/web_notification_tray_win_browsertest.cc |
index efe542944cf84b5fd715af503ce0a26ffec09637..fb5b99530ddc7d1bca30cc67209a29c63ee4f2fd 100644 |
--- a/chrome/browser/ui/views/message_center/web_notification_tray_win_browsertest.cc |
+++ b/chrome/browser/ui/views/message_center/web_notification_tray_win_browsertest.cc |
@@ -17,7 +17,7 @@ |
#include "ui/message_center/notification_list.h" |
#include "ui/message_center/notification_types.h" |
#include "ui/message_center/views/message_center_bubble.h" |
-#include "ui/message_center/views/message_popup_bubble.h" |
+#include "ui/message_center/views/message_popup_collection.h" |
#include "ui/views/controls/label.h" |
#include "ui/views/layout/fill_layout.h" |
#include "ui/views/view.h" |
@@ -103,8 +103,8 @@ typedef InProcessBrowserTest WebNotificationTrayWinTest; |
// TODO(dewittj): More exhaustive testing. |
IN_PROC_BROWSER_TEST_F(WebNotificationTrayWinTest, WebNotifications) { |
- scoped_ptr<WebNotificationTrayWin> tray(new WebNotificationTrayWin()); |
- message_center::MessageCenter* message_center = tray->message_center(); |
+ message_center::MessageCenter* message_center = |
+ message_center::MessageCenter::Get(); |
scoped_ptr<TestDelegate> delegate(new TestDelegate(message_center)); |
// Add a notification. |
@@ -187,6 +187,8 @@ IN_PROC_BROWSER_TEST_F(WebNotificationTrayWinTest, |
message_center->NotificationCount()); |
EXPECT_EQ(NotificationList::kMaxVisibleMessageCenterNotifications, |
tray->GetMessageCenterBubbleForTest()->NumMessageViewsForTest()); |
+ message_center->notification_list()->RemoveAllNotifications(); |
+ message_center->NotifyMessageCenterChanged(false); |
} |
IN_PROC_BROWSER_TEST_F(WebNotificationTrayWinTest, ManyPopupNotifications) { |
@@ -207,10 +209,11 @@ IN_PROC_BROWSER_TEST_F(WebNotificationTrayWinTest, ManyPopupNotifications) { |
EXPECT_TRUE(tray->message_center_tray_->popups_visible()); |
EXPECT_EQ(notifications_to_add, |
message_center->NotificationCount()); |
- EXPECT_EQ(NotificationList::kMaxVisiblePopupNotifications, |
- tray->GetPopupBubbleForTest()->NumMessageViewsForTest()); |
- message_center->SetDelegate(NULL); |
+ NotificationList::PopupNotifications popups = |
+ message_center->notification_list()->GetPopupNotifications(); |
+ EXPECT_EQ(NotificationList::kMaxVisiblePopupNotifications, popups.size()); |
message_center->notification_list()->RemoveAllNotifications(); |
+ message_center->NotifyMessageCenterChanged(false); |
} |
} // namespace message_center |