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

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

Issue 1388483002: Implement the Notification `timestamp` property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 fbe714a3a125e00c9ae4f12fc4121ec45c77f417..5fb05b9fadefb2307cd5a8e24b37b2b506b55dcc 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",
+ timestamp: 621046800000,
silent: true,
requireInteraction: true,
data: "my data",
@@ -36,6 +37,7 @@
assert_equals(notification.body, options.body);
assert_equals(notification.tag, options.tag);
assert_equals(notification.icon, options.icon);
+ assert_equals(notification.timestamp, options.timestamp);
assert_true(notification.silent);
assert_true(notification.requireInteraction);
assert_equals(notification.data, options.data);
@@ -55,6 +57,9 @@
assert_equals(emptyNotification.data, null);
assert_array_equals(emptyNotification.actions, []);
+ var timeDifference = Math.abs(Date.now() - emptyNotification.timestamp);
+ assert_true(timeDifference < 16); // 16 is not significant, just to reduce flakiness.
+
var equalNotification = new Notification("My Notification", {
vibrate: [50, 10, 50, 10, 50],
data: { hello: "World!" }

Powered by Google App Engine
This is Rietveld 408576698