mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
62 lines
1.8 KiB
HTML
62 lines
1.8 KiB
HTML
<!doctype html>
|
|
<meta charset="utf-8">
|
|
<title>Async Cookies: IDL tests</title>
|
|
<link rel="help" href="https://github.com/WICG/cookie-store"/>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/resources/WebIDLParser.js"></script>
|
|
<script src="/resources/idlharness.js"></script>
|
|
<script>
|
|
'use strict';
|
|
|
|
promise_test(async t => {
|
|
const urls = [
|
|
'/interfaces/uievents.idl',
|
|
'/interfaces/dom.idl',
|
|
'/interfaces/html.idl',
|
|
'/interfaces/cookie-store.idl'
|
|
];
|
|
const [uievents, dom, html, cookie_store] = await Promise.all(
|
|
urls.map(url => fetch(url).then(r => r.text())));
|
|
|
|
const idl_array = new IdlArray();
|
|
|
|
// Dependencies of HTML
|
|
idl_array.add_untested_idls(dom, { only: [
|
|
'Event',
|
|
'EventInit',
|
|
'EventTarget',
|
|
'HTMLCollection',
|
|
'NodeList',
|
|
] });
|
|
idl_array.add_untested_idls('interface Document {};');
|
|
idl_array.add_untested_idls('interface Element {};');
|
|
idl_array.add_untested_idls('interface LinkStyle {};');
|
|
idl_array.add_untested_idls('interface SVGElement {};');
|
|
idl_array.add_untested_idls(html);
|
|
idl_array.add_untested_idls(uievents, { only: [
|
|
'UIEvent',
|
|
'UIEventInit',
|
|
'MouseEvent',
|
|
'MouseEventInit',
|
|
'EventModifierInit',
|
|
] });
|
|
|
|
idl_array.add_untested_idls(
|
|
`dictionary ExtendableEventInit {};`);
|
|
idl_array.add_untested_idls(
|
|
`[Global=ExtendableEvent, Exposed=ServiceWorker]
|
|
interface ExtendableEvent : Event {};`);
|
|
idl_array.add_untested_idls(
|
|
`[Global=ServiceWorker, Exposed=ServiceWorker]
|
|
interface ServiceWorkerGlobalScope {};`);
|
|
|
|
idl_array.add_idls(cookie_store);
|
|
|
|
idl_array.add_objects({
|
|
CookieStore: ["self.cookieStore"],
|
|
CookieChangeEvent: ["new CookieChangeEvent('change')"],
|
|
});
|
|
idl_array.test();
|
|
}, 'Interface test');
|
|
</script>
|