mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Update web-platform-tests to revision 4333a1d2f109795547fc5e22ebfc8481fa649de7
This commit is contained in:
parent
728ebcc932
commit
8c46b67f8e
456 changed files with 10561 additions and 5108 deletions
|
@ -1,15 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Background Fetch API IDL tests</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script>
|
||||
|
||||
<h1>idlharness test</h1>
|
||||
<p>This test validates the WebIDL included in the Background Fetch API (Service Workers).</p>
|
||||
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
service_worker_test('interfaces.worker.js', 'Service Worker-scoped tests.');
|
||||
</script>
|
|
@ -1,28 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Background Fetch API IDL tests</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/WebIDLParser.js"></script>
|
||||
<script src="/resources/idlharness.js"></script>
|
||||
|
||||
<h1>idlharness test</h1>
|
||||
<p>This test validates the WebIDL included in the Background Fetch API (Documents).</p>
|
||||
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
promise_test(async function () {
|
||||
const idls = await fetch('/interfaces/background-fetch.idl').then(r => r.text());
|
||||
const dom = await fetch('/interfaces/dom.idl').then(r => r.text());
|
||||
|
||||
var idlArray = new IdlArray();
|
||||
idlArray.add_untested_idls('interface ServiceWorkerRegistration {};');
|
||||
idlArray.add_untested_idls('[Exposed=ServiceWorker] interface ServiceWorkerGlobalScope {};');
|
||||
idlArray.add_untested_idls('interface ExtendableEvent{};');
|
||||
idlArray.add_untested_idls('dictionary ExtendableEventInit{};');
|
||||
idlArray.add_untested_idls(dom, { only: ['EventTarget'] });
|
||||
idlArray.add_idls(idls);
|
||||
idlArray.test();
|
||||
}, 'Exposed interfaces in a Document.');
|
||||
</script>
|
|
@ -0,0 +1,19 @@
|
|||
// 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', 'ServiceWorker', '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');
|
|
@ -1,20 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
importScripts('/resources/testharness.js');
|
||||
importScripts('/resources/WebIDLParser.js', '/resources/idlharness.js');
|
||||
|
||||
promise_test(async function() {
|
||||
const idls = await fetch('/interfaces/background-fetch.idl').then(r => r.text());
|
||||
const dom = await fetch('/interfaces/dom.idl').then(r => r.text());
|
||||
|
||||
var idlArray = new IdlArray();
|
||||
idlArray.add_untested_idls('interface ServiceWorkerRegistration {};');
|
||||
idlArray.add_untested_idls('[SecureContext, Exposed = (Window, Worker)] interface ServiceWorkerGlobalScope {};');
|
||||
idlArray.add_untested_idls('interface ExtendableEvent{};');
|
||||
idlArray.add_untested_idls('dictionary ExtendableEventInit{};');
|
||||
idlArray.add_untested_idls(dom, { only: ['EventTarget'] });
|
||||
idlArray.add_idls(idls);
|
||||
idlArray.test();
|
||||
}, 'Exposed interfaces in a Service Worker.');
|
||||
|
||||
done();
|
Loading…
Add table
Add a link
Reference in a new issue