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

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

Issue 12668009: Revert 188217 "Switch Windows to use the MessagePopupCollection" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
Index: chrome/browser/ui/views/message_center/web_notification_tray_win_browsertest.cc
===================================================================
--- chrome/browser/ui/views/message_center/web_notification_tray_win_browsertest.cc (revision 188316)
+++ chrome/browser/ui/views/message_center/web_notification_tray_win_browsertest.cc (working copy)
@@ -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_collection.h"
+#include "ui/message_center/views/message_popup_bubble.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/view.h"
@@ -103,8 +103,8 @@
// TODO(dewittj): More exhaustive testing.
IN_PROC_BROWSER_TEST_F(WebNotificationTrayWinTest, WebNotifications) {
- message_center::MessageCenter* message_center =
- message_center::MessageCenter::Get();
+ scoped_ptr<WebNotificationTrayWin> tray(new WebNotificationTrayWin());
+ message_center::MessageCenter* message_center = tray->message_center();
scoped_ptr<TestDelegate> delegate(new TestDelegate(message_center));
// Add a notification.
@@ -187,8 +187,6 @@
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) {
@@ -209,11 +207,10 @@
EXPECT_TRUE(tray->message_center_tray_->popups_visible());
EXPECT_EQ(notifications_to_add,
message_center->NotificationCount());
- NotificationList::PopupNotifications popups =
- message_center->notification_list()->GetPopupNotifications();
- EXPECT_EQ(NotificationList::kMaxVisiblePopupNotifications, popups.size());
+ EXPECT_EQ(NotificationList::kMaxVisiblePopupNotifications,
+ tray->GetPopupBubbleForTest()->NumMessageViewsForTest());
+ message_center->SetDelegate(NULL);
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') | ui/message_center/message_center.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698