OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <body> |
| 4 <script src="../../resources/js-test.js"></script> |
| 5 <script> |
| 6 description("The legacy notification constructor should throw exceptions
in certain cases."); |
| 7 |
| 8 // No permission grant; should throw SecurityError. |
| 9 shouldThrow('window.webkitNotifications.createNotification("", "Title",
"Message");', '"SecurityError: Failed to execute \'createNotification\' on \'Not
ificationCenter\': Notification permission has not been granted."'); |
| 10 |
| 11 // Invalid icon should throw SyntaxError. |
| 12 testRunner.grantWebNotificationPermission("file://"); |
| 13 shouldThrow('window.webkitNotifications.createNotification("http:///", "
Title", "Message");', '"SyntaxError: Failed to execute \'createNotification\' on
\'NotificationCenter\': \'http:///\' is not a valid icon URL."'); |
| 14 </script> |
| 15 </body> |
| 16 </html> |
OLD | NEW |