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

Side by Side Diff: chrome/browser/ui/views/message_center/web_notification_tray_browsertest.cc

Issue 231723006: Remove balloon notification code. The last user was the Linux GTK port but that's deleted now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync after elliot's r263101 Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/message_center/web_notification_tray.h" 5 #include "chrome/browser/ui/views/message_center/web_notification_tray.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/system/status_area_widget.h" 10 #include "ash/system/status_area_widget.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 EXPECT_TRUE(tray->message_center_tray_->popups_visible()); 200 EXPECT_TRUE(tray->message_center_tray_->popups_visible());
201 EXPECT_EQ(notifications_to_add, message_center->NotificationCount()); 201 EXPECT_EQ(notifications_to_add, message_center->NotificationCount());
202 NotificationList::PopupNotifications popups = 202 NotificationList::PopupNotifications popups =
203 message_center->GetPopupNotifications(); 203 message_center->GetPopupNotifications();
204 EXPECT_EQ(kMaxVisiblePopupNotifications, popups.size()); 204 EXPECT_EQ(kMaxVisiblePopupNotifications, popups.size());
205 } 205 }
206 206
207 IN_PROC_BROWSER_TEST_F(WebNotificationTrayTest, 207 IN_PROC_BROWSER_TEST_F(WebNotificationTrayTest,
208 ManuallyCloseMessageCenter) { 208 ManuallyCloseMessageCenter) {
209 NotificationUIManager* manager = g_browser_process->notification_ui_manager(); 209 NotificationUIManager* manager = g_browser_process->notification_ui_manager();
210 ASSERT_TRUE(manager->DelegatesToMessageCenter());
211 MessageCenterNotificationManager* mc_manager = 210 MessageCenterNotificationManager* mc_manager =
212 static_cast<MessageCenterNotificationManager*>(manager); 211 static_cast<MessageCenterNotificationManager*>(manager);
213 212
214 WebNotificationTray* tray = 213 WebNotificationTray* tray =
215 static_cast<WebNotificationTray*>(mc_manager->tray_.get()); 214 static_cast<WebNotificationTray*>(mc_manager->tray_.get());
216 ASSERT_TRUE(NULL != tray); 215 ASSERT_TRUE(NULL != tray);
217 216
218 message_center::MessageCenter* message_center = tray->message_center(); 217 message_center::MessageCenter* message_center = tray->message_center();
219 218
220 bool shown = tray->message_center_tray_->ShowMessageCenterBubble(); 219 bool shown = tray->message_center_tray_->ShowMessageCenterBubble();
221 EXPECT_TRUE(shown); 220 EXPECT_TRUE(shown);
222 EXPECT_TRUE(message_center->IsMessageCenterVisible()); 221 EXPECT_TRUE(message_center->IsMessageCenterVisible());
223 222
224 mc_manager->EnsureMessageCenterClosed(); 223 mc_manager->EnsureMessageCenterClosed();
225 224
226 EXPECT_FALSE(message_center->IsMessageCenterVisible()); 225 EXPECT_FALSE(message_center->IsMessageCenterVisible());
227 if (NULL != tray->message_center_delegate_) 226 if (NULL != tray->message_center_delegate_)
228 EXPECT_TRUE(tray->message_center_delegate_->GetWidget()->IsClosed()); 227 EXPECT_TRUE(tray->message_center_delegate_->GetWidget()->IsClosed());
229 } 228 }
230 229
231 } // namespace message_center 230 } // namespace message_center
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/task_manager_notification_browsertest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698