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

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

Issue 12052057: Introduces 'context' param to NotifierSettingsView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 (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/system/status_area_widget.h" 10 #include "ash/system/status_area_widget.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 virtual void DisableExtension(const std::string& notifcation_id) { 53 virtual void DisableExtension(const std::string& notifcation_id) {
54 } 54 }
55 55
56 virtual void DisableNotificationsFromSource( 56 virtual void DisableNotificationsFromSource(
57 const std::string& notifcation_id) { 57 const std::string& notifcation_id) {
58 } 58 }
59 59
60 virtual void ShowSettings(const std::string& notifcation_id) { 60 virtual void ShowSettings(const std::string& notifcation_id) {
61 } 61 }
62 62
63 virtual void ShowSettingsDialog(gfx::NativeView context) {
64 }
65
63 virtual void OnClicked(const std::string& notifcation_id) { 66 virtual void OnClicked(const std::string& notifcation_id) {
64 } 67 }
65 68
66 void AddNotification(WebNotificationTray* tray, const std::string& id) { 69 void AddNotification(WebNotificationTray* tray, const std::string& id) {
67 notification_ids_.insert(id); 70 notification_ids_.insert(id);
68 tray->message_center()->AddNotification( 71 tray->message_center()->AddNotification(
69 ui::notifications::NOTIFICATION_TYPE_SIMPLE, 72 ui::notifications::NOTIFICATION_TYPE_SIMPLE,
70 id, 73 id,
71 ASCIIToUTF16("Test Web Notification"), 74 ASCIIToUTF16("Test Web Notification"),
72 ASCIIToUTF16("Notification message body."), 75 ASCIIToUTF16("Notification message body."),
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 tray->HidePopupBubble(); 210 tray->HidePopupBubble();
208 tray->ShowPopupBubble(); 211 tray->ShowPopupBubble();
209 EXPECT_TRUE(tray->popup_bubble() != NULL); 212 EXPECT_TRUE(tray->popup_bubble() != NULL);
210 EXPECT_EQ(notifications_to_add, 213 EXPECT_EQ(notifications_to_add,
211 tray->message_center()->NotificationCount()); 214 tray->message_center()->NotificationCount());
212 EXPECT_EQ(NotificationList::kMaxVisiblePopupNotifications, 215 EXPECT_EQ(NotificationList::kMaxVisiblePopupNotifications,
213 tray->GetPopupBubbleForTest()->NumMessageViewsForTest()); 216 tray->GetPopupBubbleForTest()->NumMessageViewsForTest());
214 } 217 }
215 218
216 } // namespace ash 219 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698