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 if (window.testRunner) | |
14 testRunner.clearWebNotificationPermissions(); | |
15 | |
16 test(function () { | 13 test(function () { |
17 var options = { | 14 var options = { |
18 dir: "rtl", | 15 dir: "rtl", |
19 lang: "nl-NL", | 16 lang: "nl-NL", |
20 body: "Hallo, wereld!", | 17 body: "Hallo, wereld!", |
21 tag: "notification", | 18 tag: "notification", |
22 icon: "http://localhost/my_icon.png", | 19 icon: "http://localhost/my_icon.png", |
23 silent: true, | 20 silent: true, |
24 data: "my data" | 21 data: "my data" |
25 }; | 22 }; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 assert_throws(new TypeError(), function() { | 88 assert_throws(new TypeError(), function() { |
92 var notification = new Notification("My Notification", { | 89 var notification = new Notification("My Notification", { |
93 silent: true, | 90 silent: true, |
94 vibrate: 1000 | 91 vibrate: 1000 |
95 }); | 92 }); |
96 }, 'Set vibrate, when silent is true.'); | 93 }, 'Set vibrate, when silent is true.'); |
97 | 94 |
98 }, 'Checks the properties exposed on the Notification object.'); | 95 }, 'Checks the properties exposed on the Notification object.'); |
99 </script> | 96 </script> |
100 </body> | 97 </body> |
101 </html> | 98 </html> |
OLD | NEW |