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

Unified Diff: chrome/browser/ui/views/message_center/web_notification_tray_win_browsertest.cc

Issue 12667018: Switch Windows to use the MessagePopupCollection (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase. Created 7 years, 9 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 | « chrome/browser/ui/views/message_center/web_notification_tray_win.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/ui/views/message_center/web_notification_tray_win.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698