| Index: LayoutTests/fast/notifications/notifications-click-event.html
|
| diff --git a/LayoutTests/fast/notifications/notifications-click-event.html b/LayoutTests/fast/notifications/notifications-click-event.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..cd402ecd524e857868fb476e050e7c83d494faa8
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/notifications/notifications-click-event.html
|
| @@ -0,0 +1,44 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| + <script type="text/javascript">
|
| + function log(message)
|
| + {
|
| + document.getElementById("result").innerHTML += message + "<br>";
|
| + }
|
| +
|
| + function runTests()
|
| + {
|
| + if (window.testRunner) {
|
| + testRunner.grantWebNotificationPermission("file://");
|
| + testRunner.dumpAsText();
|
| + if (testRunner.dumpNotifications)
|
| + testRunner.dumpNotifications();
|
| + testRunner.waitUntilDone();
|
| + }
|
| +
|
| + if (!window.webkitNotifications) {
|
| + log("FAIL: No webkitNotifications interface!");
|
| + }
|
| +
|
| + var N = window.webkitNotifications.createNotification("", "New E-mail", "Meet me tonight at 8!");
|
| + N.onclick = function() { log("PASS: click event fired."); N.cancel(); }
|
| + N.show();
|
| + if (window.testRunner) {
|
| + testRunner.simulateLegacyWebNotificationClick("New E-mail");
|
| + testRunner.notifyDone();
|
| + }
|
| + }
|
| + </script>
|
| +</head>
|
| +<body>
|
| +<p>Showing notifications.</p>
|
| +
|
| +<p>To exercise manually, grant notification permissions and load this page, then click on the notification. You should see a "PASS" message.</p>
|
| +<div id="result"></div>
|
| +
|
| +<script type="text/javascript">
|
| +runTests();
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|