mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update web-platform-tests to revision af43e2eb32555059316b67fba4a1d7df6ea3148d
This commit is contained in:
parent
97c6246385
commit
2f89d25484
296 changed files with 21168 additions and 821 deletions
|
@ -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');
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue