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

Side by Side Diff: ash/system/web_notification/web_notification_tray_unittest.cc

Issue 15582004: Move NotificationDelegate into message_center. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the ever-changing Mac unit tests. Created 7 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/system/web_notification/web_notification_tray.h" 5 #include "ash/system/web_notification/web_notification_tray.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/shelf/shelf_widget.h" 10 #include "ash/shelf/shelf_widget.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 protected: 57 protected:
58 void AddNotification(const std::string& id) { 58 void AddNotification(const std::string& id) {
59 GetMessageCenter()->AddNotification( 59 GetMessageCenter()->AddNotification(
60 message_center::NOTIFICATION_TYPE_SIMPLE, 60 message_center::NOTIFICATION_TYPE_SIMPLE,
61 id, 61 id,
62 ASCIIToUTF16("Test Web Notification"), 62 ASCIIToUTF16("Test Web Notification"),
63 ASCIIToUTF16("Notification message body."), 63 ASCIIToUTF16("Notification message body."),
64 ASCIIToUTF16("www.test.org"), 64 ASCIIToUTF16("www.test.org"),
65 "" /* extension id */, 65 "" /* extension id */,
66 NULL /* optional_fields */); 66 NULL /* optional_fields */,
67 NULL /* delegate */);
67 } 68 }
68 69
69 void UpdateNotification(const std::string& old_id, 70 void UpdateNotification(const std::string& old_id,
70 const std::string& new_id) { 71 const std::string& new_id) {
71 GetMessageCenter()->UpdateNotification( 72 GetMessageCenter()->UpdateNotification(
72 old_id, new_id, 73 old_id,
74 new_id,
73 ASCIIToUTF16("Updated Web Notification"), 75 ASCIIToUTF16("Updated Web Notification"),
74 ASCIIToUTF16("Updated message body."), 76 ASCIIToUTF16("Updated message body."),
77 NULL,
75 NULL); 78 NULL);
76 } 79 }
77 80
78 void RemoveNotification(const std::string& id) { 81 void RemoveNotification(const std::string& id) {
79 GetMessageCenter()->RemoveNotification(id, false); 82 GetMessageCenter()->RemoveNotification(id, false);
80 } 83 }
81 84
82 views::Widget* GetWidget() { 85 views::Widget* GetWidget() {
83 return GetTray()->GetWidget(); 86 return GetTray()->GetWidget();
84 } 87 }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 NotificationList::PopupNotifications popups = 186 NotificationList::PopupNotifications popups =
184 GetMessageCenter()->GetPopupNotifications(); 187 GetMessageCenter()->GetPopupNotifications();
185 EXPECT_EQ(message_center::kMaxVisiblePopupNotifications, popups.size()); 188 EXPECT_EQ(message_center::kMaxVisiblePopupNotifications, popups.size());
186 } else { 189 } else {
187 EXPECT_EQ(message_center::kMaxVisiblePopupNotifications, 190 EXPECT_EQ(message_center::kMaxVisiblePopupNotifications,
188 GetTray()->GetPopupBubbleForTest()->NumMessageViewsForTest()); 191 GetTray()->GetPopupBubbleForTest()->NumMessageViewsForTest());
189 } 192 }
190 } 193 }
191 194
192 } // namespace ash 195 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/window_type_launcher.cc ('k') | chrome/browser/notifications/message_center_notification_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698