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