| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../../resources/js-test.js"></script> |
| 5 </head> |
| 6 <body> |
| 7 <p> |
| 8 Tests that Notification.click() will result in the onclick event being cal
led. When |
| 9 running this test manually, accept the permission and click on the shown n
otification. |
| 10 </p> |
| 11 <div id="console"></div> |
| 12 <script> |
| 13 if (window.testRunner) { |
| 14 testRunner.grantWebNotificationPermission("file://", true); |
| 15 testRunner.waitUntilDone(); |
| 16 } |
| 17 |
| 18 var notification = new Notification("Notification"); |
| 19 notification.addEventListener("show", function() { |
| 20 testPassed("notification.onshow() has been called."); |
| 21 if (window.testRunner) |
| 22 testRunner.simulateWebNotificationClick("Notification"); |
| 23 }); |
| 24 |
| 25 notification.addEventListener("click", function() { |
| 26 testPassed("notification.onclick() has been called."); |
| 27 notification.close(); |
| 28 |
| 29 if (window.testRunner) |
| 30 testRunner.notifyDone(); |
| 31 }); |
| 32 </script> |
| 33 </body> |
| 34 </body> |
| OLD | NEW |