forked from web-platform-tests/wpt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterfaces.any.js
More file actions
41 lines (30 loc) · 1.26 KB
/
interfaces.any.js
File metadata and controls
41 lines (30 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// META: global=worker
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// See https://notifications.spec.whatwg.org/
// This file's contents are duplicated in notifications/interfaces.https.any.js
// as a workaround for https://github.com/w3c/web-platform-tests/issues/11105
"use strict";
promise_test(async () => {
const sw_idl = await fetch('/interfaces/ServiceWorker.idl').then(r => r.text());
const dedicated_workers_idl = await fetch('/interfaces/dedicated-workers.idl').then(r => r.text());
const dom_idl = await fetch('/interfaces/dom.idl').then(r => r.text());
const notifications_idl = await fetch('/interfaces/notifications.idl').then(r => r.text());
var idlArray = new IdlArray();
idlArray.add_untested_idls(sw_idl, { only: [
'ServiceWorkerRegistration',
'ServiceWorkerGlobalScope',
'ExtendableEvent',
'ExtendableEventInit',
] });
idlArray.add_untested_idls(dedicated_workers_idl);
idlArray.add_untested_idls(dom_idl, { only: [ 'Event', 'EventInit' ] });
idlArray.add_idls(notifications_idl);
if (!self.GLOBAL.isWorker()) {
idlArray.add_objects({
Notification: ['new Notification("Running idlharness.")'],
});
}
idlArray.test();
done();
}, 'notifications interfaces.');