| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Notifications: The Notification object exposes the expected propertie
s.</title> | 4 <title>Notifications: The Notification object exposes the expected propertie
s.</title> |
| 5 <script src="../resources/testharness.js"></script> | 5 <script src="../resources/testharness.js"></script> |
| 6 <script src="../resources/testharnessreport.js"></script> | 6 <script src="../resources/testharnessreport.js"></script> |
| 7 </head> | 7 </head> |
| 8 <body> | 8 <body> |
| 9 <script> | 9 <script> |
| 10 // Tests that the Notification object exposes the properties per the | 10 // Tests that the Notification object exposes the properties per the |
| 11 // semantics defined by the specification. When the test is being ran | 11 // semantics defined by the specification. When the test is being ran |
| 12 // manually, grant Notification permission first. | 12 // manually, grant Notification permission first. |
| 13 test(function () { | 13 test(function () { |
| 14 assert_greater_than_equal(Notification.maxActions, 0); | 14 assert_greater_than_equal(Notification.maxActions, 0); |
| 15 var oldMaxActions = Notification.maxActions; |
| 16 Notification.maxActions++; |
| 17 assert_equals(Notification.maxActions, oldMaxActions, 'Notification.ma
xActions should be immutable.'); |
| 15 | 18 |
| 16 var options = { | 19 var options = { |
| 17 dir: "rtl", | 20 dir: "rtl", |
| 18 lang: "nl-NL", | 21 lang: "nl-NL", |
| 19 body: "Hallo, wereld!", | 22 body: "Hallo, wereld!", |
| 20 tag: "notification", | 23 tag: "notification", |
| 21 icon: "http://localhost/my_icon.png", | 24 icon: "http://localhost/my_icon.png", |
| 22 silent: true, | 25 silent: true, |
| 23 requireInteraction: true, | 26 requireInteraction: true, |
| 24 data: "my data", | 27 data: "my data", |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // Invalid vibrate pattern should be reset to 0. | 120 // Invalid vibrate pattern should be reset to 0. |
| 118 var invalidVibrateNotification = new Notification("My Notification",
{ | 121 var invalidVibrateNotification = new Notification("My Notification",
{ |
| 119 vibrate: [100, 200, "invalid"] | 122 vibrate: [100, 200, "invalid"] |
| 120 }); | 123 }); |
| 121 assert_array_equals(invalidVibrateNotification.vibrate, [100, 200, 0
]); | 124 assert_array_equals(invalidVibrateNotification.vibrate, [100, 200, 0
]); |
| 122 | 125 |
| 123 }, 'Checks the properties exposed on the Notification object.'); | 126 }, 'Checks the properties exposed on the Notification object.'); |
| 124 </script> | 127 </script> |
| 125 </body> | 128 </body> |
| 126 </html> | 129 </html> |
| OLD | NEW |