| 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 ff7ac2d450005fddb0cc41069a2287233c1559c1..abc17fd0721e85051f25c805db92022fb236b890 100644
|
| --- a/chrome/test/data/notifications/notification_tester.html
|
| +++ b/chrome/test/data/notifications/notification_tester.html
|
| @@ -7,8 +7,6 @@ Also can be used to request permission for notifications.
|
|
|
| // Array of all notifications this page has created.
|
| var g_notifications = [];
|
| -// Object of notifications which have been closed.
|
| -var g_closed_notifications = {};
|
| // Whether the site has requested and been granted permission.
|
| var g_permissionGranted = false;
|
|
|
| @@ -66,33 +64,20 @@ function onPermissionGranted() {
|
| // back on error. If |waitForDisplay| is true, the response will not be sent
|
| // until the notification is actually displayed.
|
| function createNotificationHelper(note, waitForDisplay) {
|
| - var notification_id = g_notifications.length;
|
| -
|
| - g_notifications.push(note);
|
| - g_closed_notifications[notification_id] = false;
|
| -
|
| function sendNotificationIdToTest() {
|
| - sendResultToTest(notification_id);
|
| + sendResultToTest(g_notifications.length - 1);
|
| }
|
| -
|
| + g_notifications.push(note);
|
| if (waitForDisplay)
|
| note.onshow = sendNotificationIdToTest;
|
| note.onerror = function() {
|
| sendResultToTest(-1);
|
| }
|
| - note.onclose = function() {
|
| - g_closed_notifications[notification_id] = true;
|
| - }
|
|
|
| if (!waitForDisplay)
|
| sendNotificationIdToTest();
|
| }
|
|
|
| -// Returns whether the notification with Id has been closed.
|
| -function hasBeenClosed(notification_id) {
|
| - sendResultToTest(g_closed_notifications[notification_id]);
|
| -}
|
| -
|
| // Sends a result back to the main test logic.
|
| function sendResultToTest(result) {
|
| // Convert the result to a string.
|
|
|