| 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..3c6ea37e2ad2376eaa6bcf2984f773bde2b6147d 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,19 @@
|
| });
|
| }
|
|
|
| + // Displays a persistent notification having every field in its options
|
| + // 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
|
| + });
|
| + }
|
| +
|
| // 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
|
|
|