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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/notifications/notification-properties.html

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: third_party/WebKit/LayoutTests/http/tests/notifications/notification-properties.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/notifications/notification-properties.html b/third_party/WebKit/LayoutTests/http/tests/notifications/notification-properties.html
index 5fb05b9fadefb2307cd5a8e24b37b2b506b55dcc..2318ef1aed2b0a4469999ac50210980d41b69407 100644
--- a/third_party/WebKit/LayoutTests/http/tests/notifications/notification-properties.html
+++ b/third_party/WebKit/LayoutTests/http/tests/notifications/notification-properties.html
@@ -22,6 +22,7 @@
body: "Hallo, wereld!",
tag: "notification",
icon: "http://localhost/my_icon.png",
+ badge: "http://localhost/badge.png",
timestamp: 621046800000,
silent: true,
requireInteraction: true,
@@ -37,6 +38,7 @@
assert_equals(notification.body, options.body);
assert_equals(notification.tag, options.tag);
assert_equals(notification.icon, options.icon);
+ assert_equals(notification.badge, options.badge);
assert_equals(notification.timestamp, options.timestamp);
assert_true(notification.silent);
assert_true(notification.requireInteraction);
@@ -51,6 +53,7 @@
assert_equals(emptyNotification.body, "");
assert_equals(emptyNotification.tag, "");
assert_equals(emptyNotification.icon, "");
+ assert_equals(emptyNotification.badge, "");
assert_equals(notification.vibrate, null);
assert_false(emptyNotification.silent);
assert_false(emptyNotification.requireInteraction);
@@ -72,11 +75,13 @@
//assert_true(equalNotification.vibrate === equalNotification.vibrate, '`vibrate` object equality');
var serializedUrlNotification = new Notification("My Notification", {
- icon: "http://example.com"
+ icon: "https://example.com/icon.png",
+ badge: "https://example.com/badge.png"
});
// Icon URLs should be returned in serialized form.
- assert_equals(serializedUrlNotification.icon, "http://example.com/");
+ assert_equals(serializedUrlNotification.icon, "https://example.com/icon.png");
+ assert_equals(serializedUrlNotification.badge, "https://example.com/badge.png");
var noTagNotification = new Notification("My Notification"),
emptyTagNotification = new Notification("My Notification", { tag: "" });

Powered by Google App Engine
This is Rietveld 408576698