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

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: Rebase. Created 4 years, 10 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 4765dba2241c495f80845b8fa443539565164a7a..d8422057b092e4811cbac629ac403ef64176cc72 100644
--- a/content/browser/notifications/notification_database_data_unittest.cc
+++ b/content/browser/notifications/notification_database_data_unittest.cc
@@ -27,6 +27,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 double kNotificationTimestamp = 621046800.;
const unsigned char kNotificationData[] = {0xdf, 0xff, 0x0, 0x0, 0xff, 0xdf};
@@ -56,6 +57,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);
}
@@ -111,6 +113,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