| 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.close() closes the notification, and the Notificat
ion.onclose event gets called. |
| 9 </p> |
| 10 <div id="console"></div> |
| 11 <script> |
| 12 if (window.testRunner) { |
| 13 testRunner.grantWebNotificationPermission("file://", true); |
| 14 testRunner.waitUntilDone(); |
| 15 } |
| 16 |
| 17 var notification = new Notification("Notification"); |
| 18 notification.addEventListener("show", function() { |
| 19 testPassed("notification.onshow() has been called."); |
| 20 notification.close(); |
| 21 }); |
| 22 |
| 23 notification.addEventListener("close", function() { |
| 24 testPassed("notification.onclose() has been called."); |
| 25 if (window.testRunner) |
| 26 testRunner.notifyDone(); |
| 27 }); |
| 28 </script> |
| 29 </body> |
| 30 </body> |
| OLD | NEW |