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

Unified Diff: ash/system/web_notification/web_notification_tray_unittest.cc

Issue 14631005: Enable users of NotificationUIManager to specify binary images. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase for relanding. Created 7 years, 6 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 | « ash/shell/window_type_launcher.cc ('k') | chrome/browser/notifications/desktop_notification_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/web_notification/web_notification_tray_unittest.cc
diff --git a/ash/system/web_notification/web_notification_tray_unittest.cc b/ash/system/web_notification/web_notification_tray_unittest.cc
index e144fe999ff46d81ff614d9b6e05f83a1155d43d..5b593129230d457ccce68eca7f7017831e30b818 100644
--- a/ash/system/web_notification/web_notification_tray_unittest.cc
+++ b/ash/system/web_notification/web_notification_tray_unittest.cc
@@ -56,26 +56,34 @@ class WebNotificationTrayTest : public test::AshTestBase {
protected:
void AddNotification(const std::string& id) {
- GetMessageCenter()->AddNotification(
+ scoped_ptr<message_center::Notification> notification;
+ notification.reset(new message_center::Notification(
message_center::NOTIFICATION_TYPE_SIMPLE,
id,
ASCIIToUTF16("Test Web Notification"),
ASCIIToUTF16("Notification message body."),
+ gfx::Image(),
ASCIIToUTF16("www.test.org"),
"" /* extension id */,
NULL /* optional_fields */,
- NULL /* delegate */);
+ NULL /* delegate */));
+ GetMessageCenter()->AddNotification(notification.Pass());
}
void UpdateNotification(const std::string& old_id,
const std::string& new_id) {
- GetMessageCenter()->UpdateNotification(
- old_id,
+ scoped_ptr<message_center::Notification> notification;
+ notification.reset(new message_center::Notification(
+ message_center::NOTIFICATION_TYPE_SIMPLE,
new_id,
ASCIIToUTF16("Updated Web Notification"),
ASCIIToUTF16("Updated message body."),
- NULL,
- NULL);
+ gfx::Image(),
+ ASCIIToUTF16("www.test.org"),
+ "" /* extension id */,
+ NULL /* optional_fields */,
+ NULL /* delegate */));
+ GetMessageCenter()->UpdateNotification(old_id, notification.Pass());
}
void RemoveNotification(const std::string& id) {
« no previous file with comments | « ash/shell/window_type_launcher.cc ('k') | chrome/browser/notifications/desktop_notification_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698