| Index: LayoutTests/fast/notifications/notification-click.html
|
| diff --git a/LayoutTests/fast/notifications/notification-click.html b/LayoutTests/fast/notifications/notification-click.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..683b47131c04f93225f23f3e4136861fb8f01430
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/notifications/notification-click.html
|
| @@ -0,0 +1,34 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| + <head>
|
| + <script src="../../resources/js-test.js"></script>
|
| + </head>
|
| + <body>
|
| + <p>
|
| + Tests that Notification.click() will result in the onclick event being called. When
|
| + running this test manually, accept the permission and click on the shown notification.
|
| + </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.");
|
| + if (window.testRunner)
|
| + testRunner.simulateWebNotificationClick("Notification");
|
| + });
|
| +
|
| + notification.addEventListener("click", function() {
|
| + testPassed("notification.onclick() has been called.");
|
| + notification.close();
|
| +
|
| + if (window.testRunner)
|
| + testRunner.notifyDone();
|
| + });
|
| + </script>
|
| + </body>
|
| +</body>
|
|
|