OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <html> |
| 3 <head> |
| 4 <title>Verifies that double-closing a notification doesn't crash.</title> |
| 5 <meta charset="utf-8"> |
| 6 </head> |
| 7 <body> |
| 8 <script> |
| 9 function createNotification(iconUrl, title, text, tag) { |
| 10 var notification = new Notification(title, { |
| 11 icon: iconUrl, |
| 12 body: text, |
| 13 tag: tag |
| 14 }); |
| 15 |
| 16 notification.onshow = function() { |
| 17 window.domAutomationController.send("0"); // success |
| 18 }; |
| 19 |
| 20 notification.onerror = function() { |
| 21 window.domAutomationController.send("-1"); // failure |
| 22 }; |
| 23 |
| 24 notification.onclose = function() { |
| 25 notification.close(); |
| 26 }; |
| 27 } |
| 28 </script> |
| 29 </body> |
| 30 </html> |
OLD | NEW |