| 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 f54a903dc501b4142c5e42c88db5ef32ee43ea90..7c7702295a14dcf96e9855b0c31315b4206b5a3e 100644
|
| --- a/LayoutTests/http/tests/notifications/notification-properties.html
|
| +++ b/LayoutTests/http/tests/notifications/notification-properties.html
|
| @@ -40,6 +40,7 @@
|
| assert_equals(emptyNotification.body, "");
|
| assert_equals(emptyNotification.tag, "");
|
| assert_equals(emptyNotification.icon, "");
|
| + assert_equals(notification.sound, "");
|
| assert_equals(notification.vibrate, null);
|
| assert_false(emptyNotification.silent);
|
| assert_equals(emptyNotification.data, null);
|
| @@ -64,6 +65,28 @@
|
| // Setting an empty string as the tag should be equal to not setting the tag at all.
|
| assert_equals(noTagNotification.tag, emptyTagNotification.tag);
|
|
|
| + var invalidSoundNotification = new Notification("My Notification", {
|
| + sound: "http://test:test/test.mp3"
|
| + });
|
| +
|
| + // Invalid sound URLs should be reset to an empty string.
|
| + assert_equals(invalidSoundNotification.sound, "");
|
| +
|
| + var serializedSoundUrlNotification = new Notification("My Notification", {
|
| + sound: "http://example.com/example.mp3"
|
| + });
|
| +
|
| + // Sound URLs should be returned in serialized form.
|
| + assert_equals(serializedSoundUrlNotification.sound, "http://example.com/example.mp3");
|
| +
|
| + // Verifying the exception throwing behavior, when silent set true and sound is presented.
|
| + assert_throws(new TypeError(), function() {
|
| + var notification = new Notification("My Notification", {
|
| + silent: true,
|
| + sound: "http://example.com/example.mp3"
|
| + });
|
| + }, 'Set sound, when silent is true.');
|
| +
|
| var vibrateNotification = new Notification("My Notification", {
|
| vibrate: 1000
|
| });
|
|
|