OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <html lang="en"> |
| 3 <head> |
| 4 <meta charset="utf-8"> |
| 5 <title>Web Notification test-page</title> |
| 6 </head> |
| 7 <body> |
| 8 <p>This page is used to power the NotificationBrowserTest suite.</p> |
| 9 <script src="notification_test_utils.js"></script> |
| 10 <script> |
| 11 function DisplayPersistentNotification(title, options) { |
| 12 options = options || { body: 'Hello, world!', |
| 13 icon: 'icon.png' }; |
| 14 |
| 15 GetActivatedServiceWorker('service_worker.js', |
| 16 location.pathname) |
| 17 .then(function (registration) { |
| 18 return registration.showNotification(title, options); |
| 19 }).then(function () { |
| 20 domAutomationController.send('ok'); |
| 21 }).catch(function (error) { |
| 22 domAutomationController.send('' + error); |
| 23 }); |
| 24 } |
| 25 </script> |
| 26 </body> |
| 27 </html> |
OLD | NEW |