mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision 3f9178031eec5374c9a7d5709a7e11ba4a1955ed
This commit is contained in:
parent
4997ec26c2
commit
a5af9a106a
192 changed files with 3943 additions and 1927 deletions
|
@ -0,0 +1,25 @@
|
|||
// META: global=window,worker
|
||||
// META: script=/resources/WebIDLParser.js
|
||||
// META: script=/resources/idlharness.js
|
||||
|
||||
'use strict';
|
||||
|
||||
// https://wicg.github.io/background-fetch/
|
||||
|
||||
idl_test(
|
||||
['background-fetch'],
|
||||
['service-workers', 'dedicated-workers', 'dom'],
|
||||
idl_array => {
|
||||
const isServiceWorker = location.pathname.includes('.serviceworker.');
|
||||
if (isServiceWorker) {
|
||||
idl_array.add_objects({
|
||||
ServiceWorkerGlobalScope: ['self'],
|
||||
ServiceWorkerRegistration: ['registration'],
|
||||
BackgroundFetchManager: ['registration.backgroundFetch'],
|
||||
BackgroundFetchEvent: ['new BackgroundFetchEvent("type")'],
|
||||
BackgroundFetchUpdateEvent: ['new BackgroundFetchUpdateEvent("type")'],
|
||||
});
|
||||
}
|
||||
},
|
||||
'background-fetch interfaces'
|
||||
);
|
|
@ -1,24 +0,0 @@
|
|||
// META: script=/resources/WebIDLParser.js
|
||||
// META: script=/resources/idlharness.js
|
||||
|
||||
'use strict';
|
||||
|
||||
// https://wicg.github.io/background-fetch/
|
||||
|
||||
promise_test(async () => {
|
||||
const srcs = [
|
||||
'background-fetch',
|
||||
'dedicated-workers',
|
||||
'service-workers',
|
||||
'dom'
|
||||
];
|
||||
const [idls, worker, serviceWorker, dom] = await Promise.all(
|
||||
srcs.map(i => fetch(`/interfaces/${i}.idl`).then(r => r.text())));
|
||||
|
||||
var idlArray = new IdlArray();
|
||||
idlArray.add_idls(idls);
|
||||
idlArray.add_dependency_idls(serviceWorker);
|
||||
idlArray.add_dependency_idls(worker);
|
||||
idlArray.add_dependency_idls(dom);
|
||||
idlArray.test();
|
||||
}, 'background-fetch interfaces');
|
Loading…
Add table
Add a link
Reference in a new issue