| 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 f57edca70c52dcd8439b8a31b1230db63f81955b..2ae84cf9b3474f8f5205b0db2bd3542afcdd56c9 100644
|
| --- a/LayoutTests/http/tests/notifications/notification-properties.html
|
| +++ b/LayoutTests/http/tests/notifications/notification-properties.html
|
| @@ -19,7 +19,9 @@
|
| icon: "http://localhost/my_icon.png",
|
| silent: true,
|
| data: "my data",
|
| - actions: [{title: "Action 1"}, {title: "Action 2"}, {title: "Action 3"}]
|
| + actions: [{action: "one", title: "Action 1"},
|
| + {action: "two", title: "Action 2"},
|
| + {action: "three", title: "Action 3"}]
|
| };
|
|
|
| var notification = new Notification("My Notification", options);
|
| @@ -106,18 +108,28 @@
|
| });
|
| }, 'Set vibrate, when silent is true.');
|
|
|
| - // Check exception is thrown when an action doesn't contain title,
|
| - // or title is an empty string.
|
| + // Check exception is thrown when an action doesn't contain
|
| + // action/title, or when action/title is an empty string.
|
| assert_throws(new TypeError(), function() {
|
| var notification = new Notification("My Notification", {
|
| - actions: [{}]
|
| + actions: [{title: "Foo"}]
|
| });
|
| - }, 'Provide action without title.');
|
| + }, 'NotificationAction without action.');
|
| assert_throws(new TypeError(), function() {
|
| var notification = new Notification("My Notification", {
|
| - actions: [{title: ""}]
|
| + actions: [{action: "foo"}]
|
| });
|
| - }, 'Provide action with empty title.');
|
| + }, 'NotificationAction without title.');
|
| + assert_throws(new TypeError(), function() {
|
| + var notification = new Notification("My Notification", {
|
| + actions: [{action: "", title: "Foo"}]
|
| + });
|
| + }, 'NotificationAction with empty action.');
|
| + assert_throws(new TypeError(), function() {
|
| + var notification = new Notification("My Notification", {
|
| + actions: [{action: "foo", title: ""}]
|
| + });
|
| + }, 'NotificationAction with empty title.');
|
|
|
| }, 'Checks the properties exposed on the Notification object.');
|
| </script>
|
|
|