| Index: chrome/test/data/notifications/notification_tester.html
|
| diff --git a/chrome/test/data/notifications/notification_tester.html b/chrome/test/data/notifications/notification_tester.html
|
| index a5ad952e4a0ef3fbd7d8ff877936dc6dda9a3869..5bbe0f74126f36f9419a48e776fd7111e99380eb 100644
|
| --- a/chrome/test/data/notifications/notification_tester.html
|
| +++ b/chrome/test/data/notifications/notification_tester.html
|
| @@ -26,6 +26,23 @@ function createNotification(iconUrl, title, text, replaceId) {
|
| createNotificationHelper(note, replaceId, true);
|
| }
|
|
|
| +// Creates an HTML notification with a given content url.
|
| +// Returns an id for the notification, which can be used to cancel it with
|
| +// |cancelNotification|. If two notifications are created with the same
|
| +// replaceId, the second one should replace the first. If the notification
|
| +// cannot be created, this returns -1.
|
| +// If |waitForDisplay| is true, a response will not be sent until the
|
| +// notification is actually displayed.
|
| +function createHTMLNotification(contentUrl, replaceId, waitForDisplay) {
|
| + try {
|
| + var note = webkitNotifications.createHTMLNotification(contentUrl);
|
| + } catch (exception) {
|
| + sendResultToTest(-1);
|
| + return;
|
| + }
|
| + createNotificationHelper(note, replaceId, waitForDisplay);
|
| +}
|
| +
|
| // Cancels a notification with the given id. The notification must be showing,
|
| // as opposed to waiting to be shown in the display queue.
|
| // Returns '1' on success.
|
|
|