Update web-platform-tests to revision af43e2eb32555059316b67fba4a1d7df6ea3148d

This commit is contained in:
WPT Sync Bot 2018-08-15 21:29:12 -04:00
parent 97c6246385
commit 2f89d25484
296 changed files with 21168 additions and 821 deletions

View file

@ -10,18 +10,22 @@ idl_test(
['notifications'],
['service-workers', 'html', 'dom'],
idl_array => {
idl_array.add_objects({
Notification: ['notification'],
});
if (self.ServiceWorkerGlobalScope) {
idl_array.add_objects({
NotificationEvent: ['notificationEvent'],
ServiceWorkerGlobalScope: ['self'],
});
}
self.notification = new Notification("Running idlharness.");
if (self.ServiceWorkerGlobalScope) {
self.notificationEvent = new NotificationEvent("type", { notification: notification });
// NotificationEvent could be tested here, but the constructor requires
// a Notification instance which cannot be created in a service worker,
// see below.
} else {
// While the Notification interface is exposed in service workers, the
// constructor (https://notifications.spec.whatwg.org/#dom-notification-notification)
// is defined to throw a TypeError. Therefore, we only add the object in
// the other scopes.
idl_array.add_objects({
Notification: ['notification'],
});
self.notification = new Notification('title');
}
}
);