OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Notifications: Property reflection in the "notificationclick" event a
nd SWR.getNotifications().</title> | 4 <title>Notifications: Property reflection in the "notificationclick" event a
nd SWR.getNotifications().</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 <script src="../serviceworker/resources/test-helpers.js"></script> | 7 <script src="../serviceworker/resources/test-helpers.js"></script> |
8 <script src="resources/test-helpers.js"></script> | 8 <script src="resources/test-helpers.js"></script> |
9 </head> | 9 </head> |
10 <body> | 10 <body> |
(...skipping 20 matching lines...) Expand all Loading... |
31 var registration; | 31 var registration; |
32 | 32 |
33 var options = { | 33 var options = { |
34 title: scope, | 34 title: scope, |
35 dir: 'rtl', | 35 dir: 'rtl', |
36 lang: 'nl-NL', | 36 lang: 'nl-NL', |
37 body: 'Hello, world!', | 37 body: 'Hello, world!', |
38 tag: 'tag', | 38 tag: 'tag', |
39 // FIXME: Relative URLs for the icon attribute currently get refle
cted as | 39 // FIXME: Relative URLs for the icon attribute currently get refle
cted as |
40 // an absolute URL, which should probably be the given relative UR
L. | 40 // an absolute URL, which should probably be the given relative UR
L. |
| 41 image: 'https://example/image.jpg', |
41 icon: 'https://example/icon.png', | 42 icon: 'https://example/icon.png', |
42 badge: 'https://example/badge.png', | 43 badge: 'https://example/badge.png', |
43 vibrate: [100, 200, 300], | 44 vibrate: [100, 200, 300], |
44 timestamp: 621046800000, | 45 timestamp: 621046800000, |
45 renotify: true, | 46 renotify: true, |
46 silent: false, | 47 silent: false, |
47 requireInteraction: true, | 48 requireInteraction: true, |
48 data: [ | 49 data: [ |
49 { property: 'foobar', | 50 { property: 'foobar', |
50 string: '\uDFFF\u0000\uDBFF', | 51 string: '\uDFFF\u0000\uDBFF', |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 assert_equals(notifications[0].data, notifications[0].data, '`data
` attribute equality'); | 110 assert_equals(notifications[0].data, notifications[0].data, '`data
` attribute equality'); |
110 assert_equals(notifications[0].vibrate, notifications[0].vibrate,
'`vibrate` attribute equality'); | 111 assert_equals(notifications[0].vibrate, notifications[0].vibrate,
'`vibrate` attribute equality'); |
111 | 112 |
112 test.done(); | 113 test.done(); |
113 }).catch(unreached_rejection(test)); | 114 }).catch(unreached_rejection(test)); |
114 | 115 |
115 }, 'Clicking on a notification displayed by a Service Worker the notificat
ionclick event.'); | 116 }, 'Clicking on a notification displayed by a Service Worker the notificat
ionclick event.'); |
116 </script> | 117 </script> |
117 </body> | 118 </body> |
118 </html> | 119 </html> |
OLD | NEW |