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

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: Fix test. Created 4 years, 9 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..a07a5f5a36cae4abbadc006382ca6a7cc61509a5 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 kNotificationBadgeUrl[] = "https://example.com/badge.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.badge = GURL(kNotificationBadgeUrl);
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.badge, copied_notification_data.badge);
EXPECT_THAT(copied_notification_data.vibration_pattern,
testing::ElementsAreArray(kNotificationVibrationPattern));

Powered by Google App Engine
This is Rietveld 408576698