Index: LayoutTests/http/tests/notifications/resources/serviceworker-notification-constructor.js |
diff --git a/LayoutTests/http/tests/notifications/resources/serviceworker-notification-constructor.js b/LayoutTests/http/tests/notifications/resources/serviceworker-notification-constructor.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7294592935350ec33d2e60d09a1f48ec6e225657 |
--- /dev/null |
+++ b/LayoutTests/http/tests/notifications/resources/serviceworker-notification-constructor.js |
@@ -0,0 +1,11 @@ |
+importScripts('../../serviceworker/resources/worker-testharness.js'); |
+importScripts('../../resources/testharness-helpers.js'); |
+ |
+test(function() { |
+ assert_true('Notification' in self); |
+ |
+ assert_throws({ name: 'TypeError' }, function() { |
+ new Notification(); |
+ }); |
+ |
+}, 'Constructing a Notification object in a Service Worker throws.'); |