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 0a23769a106b6a2bee5bed36f32b399a1f0151ac..04c94a7d510f920b996c995fd3a1333c4f0e77a1 100644 |
| --- a/LayoutTests/http/tests/notifications/notification-properties.html |
| +++ b/LayoutTests/http/tests/notifications/notification-properties.html |
| @@ -26,6 +26,7 @@ |
| // Deliberately add more actions than are supported. |
| for (var i = 0; i < 2 * Notification.maxActions; i++) { |
| options.actions.push({ |
| + action: "" + i, |
|
Peter Beverloo
2015/07/31 18:05:34
No need for "" (bindings should do that for you)
johnme
2015/07/31 18:14:22
Done.
|
| title: "Action " + i |
| }); |
| } |
| @@ -123,18 +124,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. |
|
Peter Beverloo
2015/07/31 18:05:34
Please use a full sentence.
johnme
2015/07/31 18:14:22
Done.
|
| 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> |