Update web-platform-tests to revision 4333a1d2f109795547fc5e22ebfc8481fa649de7

This commit is contained in:
WPT Sync Bot 2018-06-22 21:05:34 -04:00
parent 728ebcc932
commit 8c46b67f8e
456 changed files with 10561 additions and 5108 deletions

View file

@ -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>

View file

@ -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>

View file

@ -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');

View file

@ -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();