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

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

Issue 1644573002: Notification actions may have an icon url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address peter's comments. Created 4 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 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 a080ae4d5581dae8e1d1da24853eb0cece12f2ba..cea13c488e4bc6660d7c8189e75b035d5e77b90e 100644
--- a/content/browser/notifications/notification_database_data_unittest.cc
+++ b/content/browser/notifications/notification_database_data_unittest.cc
@@ -26,6 +26,7 @@ const char kNotificationLang[] = "nl";
const char kNotificationBody[] = "Hello, world!";
const char kNotificationTag[] = "my_tag";
const char kNotificationIconUrl[] = "https://example.com/icon.png";
+const char kNotificationActionIconUrl[] = "https://example.com/action_icon.png";
const int kNotificationVibrationPattern[] = {100, 200, 300};
const unsigned char kNotificationData[] = {0xdf, 0xff, 0x0, 0x0, 0xff, 0xdf};
@@ -53,6 +54,7 @@ TEST(NotificationDatabaseDataTest, SerializeAndDeserializeData) {
PlatformNotificationAction notification_action;
notification_action.action = base::SizeTToString(i);
notification_action.title = base::SizeTToString16(i);
+ notification_action.icon = GURL(kNotificationActionIconUrl);
notification_data.actions.push_back(notification_action);
}
@@ -107,6 +109,8 @@ TEST(NotificationDatabaseDataTest, SerializeAndDeserializeData) {
copied_notification_data.actions[i].action);
EXPECT_EQ(notification_data.actions[i].title,
copied_notification_data.actions[i].title);
+ EXPECT_EQ(notification_data.actions[i].icon,
+ copied_notification_data.actions[i].icon);
}
}

Powered by Google App Engine
This is Rietveld 408576698