Chromium Code Reviews| Index: chrome/test/data/notifications/platform_notification_service.html |
| diff --git a/chrome/test/data/notifications/platform_notification_service.html b/chrome/test/data/notifications/platform_notification_service.html |
| index 75c15ce2934fd9bee6661e799d10c319f17d3de9..3f0ca7fad40b45a13362ec7ac12a3ff36d93327f 100644 |
| --- a/chrome/test/data/notifications/platform_notification_service.html |
| +++ b/chrome/test/data/notifications/platform_notification_service.html |
| @@ -23,14 +23,14 @@ |
| // Renews the registered Service Worker registration for this page, then |
| // displays a notification on the activated ServiceWorkerRegistration. |
| - function DisplayPersistentNotification(title) { |
| + function DisplayPersistentNotification(title, options) { |
| + options = options || { body: 'Hello, world!', |
| + icon: 'icon.png' }; |
| + |
| GetActivatedServiceWorker('platform_notification_service.js', |
| location.pathname) |
| .then(function (registration) { |
| - return registration.showNotification(title, { |
| - body: 'Hello, world!', |
| - icon: 'icon.png' |
| - }); |
| + return registration.showNotification(title, options); |
| }).then(function () { |
| messagePort.addEventListener('message', function (event) { |
| if (expectingMessage) |
| @@ -45,6 +45,20 @@ |
| }); |
| } |
| + // Displays a persistent notification having every field in it's options |
|
Michael van Ouwerkerk
2015/02/27 11:31:21
nit of all nits: its
Peter Beverloo
2015/02/27 12:26:30
Done.
|
| + // bag filled out with non-default values. |
| + function DisplayPersistentAllOptionsNotification() { |
| + DisplayPersistentNotification('Title', { |
| + dir: 'rtl', |
| + lang: 'nl-NL', |
| + body: 'Contents', |
| + tag: 'replace-id', |
| + icon: 'icon.png', |
| + silent: true |
| + }); |
| + } |
| + |
| + |
|
Michael van Ouwerkerk
2015/02/27 11:31:21
nit: one blank line is sufficient
Peter Beverloo
2015/02/27 12:26:30
Done.
|
| // Returns the latest received message from the worker. If no message has |
| // been received, nothing will be done. For successfully registered |
| // Service Workers this is OK, however, since the "message" event handler |