Chromium Code Reviews| Index: LayoutTests/http/tests/notifications/notification-properties.html |
| diff --git a/LayoutTests/http/tests/notifications/notification-properties.html b/LayoutTests/http/tests/notifications/notification-properties.html |
| index a2d4e0bb6bcb28174a851c2acd10cc9e5b7d2f99..50e2ab5f13bd16c51b3d0af10bbb6fdd2180b58a 100644 |
| --- a/LayoutTests/http/tests/notifications/notification-properties.html |
| +++ b/LayoutTests/http/tests/notifications/notification-properties.html |
| @@ -19,7 +19,8 @@ |
| lang: "nl-NL", |
| body: "Hallo, wereld!", |
| tag: "notification", |
| - icon: "http://localhost/my_icon.png" |
| + icon: "http://localhost/my_icon.png", |
| + data: "my data" |
| }; |
| var notification = new Notification("My Notification", options); |
| @@ -30,6 +31,7 @@ |
| assert_equals(notification.body, options.body); |
| assert_equals(notification.tag, options.tag); |
| assert_equals(notification.icon, options.icon); |
| + assert_equals(notification.data, options.data); |
| var emptyNotification = new Notification("My Notification"); |
| @@ -39,6 +41,7 @@ |
| assert_equals(emptyNotification.body, ""); |
| assert_equals(emptyNotification.tag, ""); |
| assert_equals(emptyNotification.icon, ""); |
| + assert_equals(emptyNotification.data, null); |
| var invalidIconNotification = new Notification("My Notification", { |
| icon: "http://test:test/" |
| @@ -60,6 +63,17 @@ |
| // Setting an empty string as the tag should be equal to not setting the tag at all. |
| assert_equals(noTagNotification.tag, emptyTagNotification.tag); |
| + // Set notification's data to a structured clone of options's data. |
|
Peter Beverloo
2015/03/10 23:34:26
While I think that the three earlier additions to
Sanghyun Park
2015/03/11 10:59:51
Okay I'll make new test file about data property.
|
| + var serializedDataNotification = new Notification("My Notification", { |
| + data: { |
| + first: "first", |
| + second: "second" |
| + } |
| + }); |
| + |
| + assert_equals(serializedDataNotification.data.first, "first"); |
| + assert_equals(serializedDataNotification.data.second, "second"); |
| + |
| }, 'Checks the properties exposed on the Notification object.'); |
| </script> |
| </body> |