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

Unified Diff: content/browser/notifications/notification_database_data_unittest.cc

Issue 2261283002: Add Notification images (Blink + desktop implementation) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check IPC drawsNothing rather than isNull Created 4 years, 4 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: content/browser/notifications/notification_database_data_unittest.cc
diff --git a/content/browser/notifications/notification_database_data_unittest.cc b/content/browser/notifications/notification_database_data_unittest.cc
index 8c8e7dd77794be6c49596e48499100bc0580cdfd..a16df41f933df4d20f79831a769f08df8c7eb580 100644
--- a/content/browser/notifications/notification_database_data_unittest.cc
+++ b/content/browser/notifications/notification_database_data_unittest.cc
@@ -29,6 +29,7 @@ const char kNotificationTitle[] = "My Notification";
const char kNotificationLang[] = "nl";
const char kNotificationBody[] = "Hello, world!";
const char kNotificationTag[] = "my_tag";
+const char kNotificationImageUrl[] = "https://example.com/image.jpg";
const char kNotificationIconUrl[] = "https://example.com/icon.png";
const char kNotificationBadgeUrl[] = "https://example.com/badge.png";
const char kNotificationActionIconUrl[] = "https://example.com/action_icon.png";
@@ -51,6 +52,7 @@ TEST(NotificationDatabaseDataTest, SerializeAndDeserializeData) {
notification_data.lang = kNotificationLang;
notification_data.body = base::ASCIIToUTF16(kNotificationBody);
notification_data.tag = kNotificationTag;
+ notification_data.image = GURL(kNotificationImageUrl);
notification_data.icon = GURL(kNotificationIconUrl);
notification_data.badge = GURL(kNotificationBadgeUrl);
notification_data.vibration_pattern = vibration_pattern;
@@ -101,6 +103,7 @@ TEST(NotificationDatabaseDataTest, SerializeAndDeserializeData) {
EXPECT_EQ(notification_data.lang, copied_notification_data.lang);
EXPECT_EQ(notification_data.body, copied_notification_data.body);
EXPECT_EQ(notification_data.tag, copied_notification_data.tag);
+ EXPECT_EQ(notification_data.image, copied_notification_data.image);
EXPECT_EQ(notification_data.icon, copied_notification_data.icon);
EXPECT_EQ(notification_data.badge, copied_notification_data.badge);

Powered by Google App Engine
This is Rietveld 408576698