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

Unified Diff: LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-reflection.html

Issue 1052693002: Add some layout tests for Notification.data on persistent notifications (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/notifications/serviceworkerregistration-document-data-invalid.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-reflection.html
diff --git a/LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-reflection.html b/LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-reflection.html
index 7f5fb86af852a90fea877b8a81db6442d05331bc..e4786c1809a1cea8049d1d5ad49b747f2ab13364 100644
--- a/LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-reflection.html
+++ b/LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-reflection.html
@@ -26,7 +26,12 @@
// FIXME: Relative URLs for the icon attribute currently get reflected as
// an absolute URL, which should probably be the given relative URL.
icon: 'https://example/icon.png',
- silent: true
+ silent: true,
+ data: [
+ { property: 'foobar',
johnme 2015/04/08 18:27:51 Since this is our only test of SerializedScriptVal
Peter Beverloo 2015/04/20 11:29:41 Done.
+ scalar: true },
+ 12.15
+ ]
};
testRunner.grantWebNotificationPermission(location.origin, true);
@@ -59,9 +64,14 @@
assert_equals(event.data.command, 'click', 'The notification was expected to be clicked.');
Object.keys(options).forEach(function(key) {
+ if (key == 'data')
+ return; // Check "data" separately to avoid stringifying it.
+
assert_equals(event.data.notification[key], options[key], 'The ' + key + ' field must be the same.');
});
+ assert_object_equals(event.data.notification.data, options.data, 'The data field must be the same.');
+
test.done();
});
}).catch(unreached_rejection(test));
« no previous file with comments | « no previous file | LayoutTests/http/tests/notifications/serviceworkerregistration-document-data-invalid.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698