| Index: LayoutTests/fast/notifications/notification-exceptions.html
|
| diff --git a/LayoutTests/fast/notifications/notification-exceptions.html b/LayoutTests/fast/notifications/notification-exceptions.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8d0c0e6f5201bf2685ddce026e87e67dbd7f9a81
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/notifications/notification-exceptions.html
|
| @@ -0,0 +1,16 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<body>
|
| + <script src="../../resources/js-test.js"></script>
|
| + <script>
|
| + description("The legacy notification constructor should throw exceptions in certain cases.");
|
| +
|
| + // No permission grant; should throw SecurityError.
|
| + shouldThrow('window.webkitNotifications.createNotification("", "Title", "Message");', '"SecurityError: Failed to execute \'createNotification\' on \'NotificationCenter\': Notification permission has not been granted."');
|
| +
|
| + // Invalid icon should throw SyntaxError.
|
| + testRunner.grantWebNotificationPermission("file://");
|
| + shouldThrow('window.webkitNotifications.createNotification("http:///", "Title", "Message");', '"SyntaxError: Failed to execute \'createNotification\' on \'NotificationCenter\': \'http:///\' is not a valid icon URL."');
|
| + </script>
|
| +</body>
|
| +</html>
|
|
|