Chromium Code Reviews| 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..4211435aa28dd6bb6c85b6c66432f9a7d21f75a7 |
| --- /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'); |
|
Michael van Ouwerkerk
2015/02/16 18:16:09
nit: can we use a relative url here?
Peter Beverloo
2015/02/16 18:23:57
Done.
|
| + |
| +test(function() { |
| + assert_true('Notification' in self); |
| + |
| + assert_throws({ name: 'TypeError' }, function() { |
| + new Notification(); |
| + }); |
| + |
| +}, 'Constructing a Notification object in a Service Worker throws.'); |