| Index: LayoutTests/fast/notifications/notification-close.html
|
| diff --git a/LayoutTests/fast/notifications/notification-close.html b/LayoutTests/fast/notifications/notification-close.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e4faf0371667c3e047af5ea2f70a446220c1dde0
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/notifications/notification-close.html
|
| @@ -0,0 +1,30 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| + <head>
|
| + <script src="../../resources/js-test.js"></script>
|
| + </head>
|
| + <body>
|
| + <p>
|
| + Tests that Notification.close() closes the notification, and the Notification.onclose event gets called.
|
| + </p>
|
| + <div id="console"></div>
|
| + <script>
|
| + if (window.testRunner) {
|
| + testRunner.grantWebNotificationPermission("file://", true);
|
| + testRunner.waitUntilDone();
|
| + }
|
| +
|
| + var notification = new Notification("Notification");
|
| + notification.addEventListener("show", function() {
|
| + testPassed("notification.onshow() has been called.");
|
| + notification.close();
|
| + });
|
| +
|
| + notification.addEventListener("close", function() {
|
| + testPassed("notification.onclose() has been called.");
|
| + if (window.testRunner)
|
| + testRunner.notifyDone();
|
| + });
|
| + </script>
|
| + </body>
|
| +</body>
|
|
|