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

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

Issue 1750083004: Add badge to web notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 94b94b8c7142a36b0bd550b12bf645a9e15b56f3..99324c0f4b7b67a56751e5def1041c46f6f848af 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 kNotificationSmallIconUrl[] = "https://example.com/small_icon.png";
const char kNotificationActionIconUrl[] = "https://example.com/action_icon.png";
const int kNotificationVibrationPattern[] = {100, 200, 300};
const double kNotificationTimestamp = 621046800.;
@@ -48,6 +49,7 @@ TEST(NotificationDatabaseDataTest, SerializeAndDeserializeData) {
notification_data.body = base::ASCIIToUTF16(kNotificationBody);
notification_data.tag = kNotificationTag;
notification_data.icon = GURL(kNotificationIconUrl);
+ notification_data.small_icon = GURL(kNotificationSmallIconUrl);
notification_data.vibration_pattern = vibration_pattern;
notification_data.timestamp = base::Time::FromJsTime(kNotificationTimestamp);
notification_data.renotify = true;
@@ -94,6 +96,7 @@ TEST(NotificationDatabaseDataTest, SerializeAndDeserializeData) {
EXPECT_EQ(notification_data.body, copied_notification_data.body);
EXPECT_EQ(notification_data.tag, copied_notification_data.tag);
EXPECT_EQ(notification_data.icon, copied_notification_data.icon);
+ EXPECT_EQ(notification_data.small_icon, copied_notification_data.small_icon);
EXPECT_THAT(copied_notification_data.vibration_pattern,
testing::ElementsAreArray(kNotificationVibrationPattern));

Powered by Google App Engine
This is Rietveld 408576698