Chromium Code Reviews| 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.< /title> | 4 <title>Notifications: Property reflection in the "notificationclick" event.< /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 16 matching lines...) Expand all Loading... | |
| 27 // an absolute URL, which should probably be the given relative UR L. | 27 // an absolute URL, which should probably be the given relative UR L. |
| 28 icon: 'https://example/icon.png', | 28 icon: 'https://example/icon.png', |
| 29 vibrate: [100, 200, 300], | 29 vibrate: [100, 200, 300], |
| 30 silent: false, | 30 silent: false, |
| 31 data: [ | 31 data: [ |
| 32 { property: 'foobar', | 32 { property: 'foobar', |
| 33 string: '\uDFFF\u0000\uDBFF', | 33 string: '\uDFFF\u0000\uDBFF', |
| 34 scalar: true }, | 34 scalar: true }, |
| 35 12.15 | 35 12.15 |
| 36 ], | 36 ], |
| 37 actions: [{title: "Action 1"}, {title: "Action 2"}, {title: "Actio n 3"}] | 37 actions: [{action: "one", title: "Action 1"}, |
|
Peter Beverloo
2015/07/30 16:25:49
Please be consistent in spacing usage (lines 31-35
johnme
2015/07/31 16:12:19
Done.
| |
| 38 {action: "two", title: "Action 2"}, | |
| 39 {action: "three", title: "Action 3"}] | |
| 38 }; | 40 }; |
| 39 | 41 |
| 40 testRunner.setPermission('notifications', 'granted', location.origin, location.origin); | 42 testRunner.setPermission('notifications', 'granted', location.origin, location.origin); |
| 41 getActiveServiceWorkerWithMessagePort(test, script, scope).then(functi on(workerInfo) { | 43 getActiveServiceWorkerWithMessagePort(test, script, scope).then(functi on(workerInfo) { |
| 42 // (1) Tell the Service Worker to display a Web Notification. | 44 // (1) Tell the Service Worker to display a Web Notification. |
| 43 workerInfo.port.postMessage({ | 45 workerInfo.port.postMessage({ |
| 44 command: 'show', | 46 command: 'show', |
| 45 | 47 |
| 46 title: scope, | 48 title: scope, |
| 47 options: options | 49 options: options |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 76 }); | 78 }); |
| 77 | 79 |
| 78 test.done(); | 80 test.done(); |
| 79 }); | 81 }); |
| 80 }).catch(unreached_rejection(test)); | 82 }).catch(unreached_rejection(test)); |
| 81 | 83 |
| 82 }, 'Clicking on a notification displayed by a Service Worker the notificat ionclick event.'); | 84 }, 'Clicking on a notification displayed by a Service Worker the notificat ionclick event.'); |
| 83 </script> | 85 </script> |
| 84 </body> | 86 </body> |
| 85 </html> | 87 </html> |
| OLD | NEW |