OLD | NEW |
1 importScripts('../../serviceworker/resources/worker-testharness.js'); | 1 importScripts('../../serviceworker/resources/worker-testharness.js'); |
2 importScripts('/resources/testharness-helpers.js'); | 2 importScripts('/resources/testharness-helpers.js'); |
3 | 3 |
4 test(function() { | 4 test(function() { |
5 assert_true('NotificationEvent' in self); | 5 assert_true('NotificationEvent' in self); |
6 | 6 |
7 }, 'NotificationEvent is exposed.'); | 7 var event = new NotificationEvent('NotificationEvent'); |
| 8 assert_equals(event.type, 'NotificationEvent'); |
| 9 assert_own_property(event, 'notification'); |
| 10 assert_inherits(event, 'waitUntil'); |
| 11 |
| 12 }, 'NotificationEvent is exposed, and has the expected interface.'); |
8 | 13 |
9 test(function() { | 14 test(function() { |
10 assert_own_property(self, 'onnotificationclick', 'The notificationclick even
t exists.'); | 15 assert_own_property(self, 'onnotificationclick', 'The notificationclick even
t exists.'); |
11 assert_own_property(self, 'onnotificationerror', 'The notificationerror even
t exists.'); | 16 assert_own_property(self, 'onnotificationerror', 'The notificationerror even
t exists.'); |
12 | 17 |
13 }, 'The notificationclick and notificationerror events exist on the global scope
.'); | 18 }, 'The notificationclick and notificationerror events exist on the global scope
.'); |
OLD | NEW |