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..23d34c282dbd2d02682e2ff1b16096bb2234f97b 100644 |
--- a/LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-reflection.html |
+++ b/LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-reflection.html |
@@ -26,7 +26,13 @@ |
// 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', |
+ string: '\uDFFF\u0000\uDBFF', |
+ scalar: true }, |
+ 12.15 |
+ ] |
}; |
testRunner.grantWebNotificationPermission(location.origin, true); |
@@ -59,9 +65,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)); |