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

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

Issue 2261283002: Add Notification images (Blink + desktop implementation) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check IPC drawsNothing rather than isNull Created 4 years, 4 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 448f5622fe9895053e3e42644821dd6fd60afb81..74fadebda2c9b7b73fe4f97219ae5629300cd4e6 100644
--- a/third_party/WebKit/LayoutTests/http/tests/notifications/notification-properties.html
+++ b/third_party/WebKit/LayoutTests/http/tests/notifications/notification-properties.html
@@ -21,6 +21,7 @@
lang: "nl-NL",
body: "Hallo, wereld!",
tag: "notification",
+ image: "http://localhost/image.jpg",
icon: "http://localhost/my_icon.png",
badge: "http://localhost/badge.png",
timestamp: 621046800000,
@@ -37,6 +38,7 @@
assert_equals(notification.lang, options.lang);
assert_equals(notification.body, options.body);
assert_equals(notification.tag, options.tag);
+ assert_equals(notification.image, options.image);
assert_equals(notification.icon, options.icon);
assert_equals(notification.badge, options.badge);
assert_equals(notification.timestamp, options.timestamp);
@@ -58,6 +60,7 @@
assert_equals(emptyNotification.lang, "");
assert_equals(emptyNotification.body, "");
assert_equals(emptyNotification.tag, "");
+ assert_equals(emptyNotification.image, "");
assert_equals(emptyNotification.icon, "");
assert_equals(emptyNotification.badge, "");
assert_array_equals(emptyNotification.vibrate, []);
@@ -79,11 +82,13 @@
assert_equals(equalNotification.vibrate, equalNotification.vibrate, '`vibrate` object equality');
var serializedUrlNotification = new Notification("My Notification", {
+ image: "https://example.com/image.jpg",
icon: "https://example.com/icon.png",
badge: "https://example.com/badge.png"
});
// Icon URLs should be returned in serialized form.
+ assert_equals(serializedUrlNotification.image, "https://example.com/image.jpg");
assert_equals(serializedUrlNotification.icon, "https://example.com/icon.png");
assert_equals(serializedUrlNotification.badge, "https://example.com/badge.png");

Powered by Google App Engine
This is Rietveld 408576698