mirror of
https://github.com/servo/servo.git
synced 2025-10-04 10:39:16 +01:00
29 lines
1 KiB
HTML
29 lines
1 KiB
HTML
<!DOCTYPE html>
|
|
<title>Font Loading API IDL tests</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-font-loading/#fontfacesetloadevent">
|
|
<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 () => {
|
|
const srcs = ['css-font-loading', 'dom', 'html', 'cssom'];
|
|
const [cssfontloading, dom, html, cssom] = await Promise.all(
|
|
srcs.map(i => fetch(`/interfaces/${i}.idl`).then(r => r.text())));
|
|
|
|
const idl_array = new IdlArray();
|
|
idl_array.add_idls(cssfontloading);
|
|
idl_array.add_dependency_idls(dom);
|
|
idl_array.add_dependency_idls(html);
|
|
idl_array.add_dependency_idls(cssom);
|
|
idl_array.add_objects({
|
|
Document: ['document'],
|
|
FontFace: ['new FontFace("family", "src")'],
|
|
FontFaceSetLoadEvent: ['new FontFaceSetLoadEvent("type")'],
|
|
FontFaceSet: ['document.fonts'],
|
|
});
|
|
idl_array.test();
|
|
}, 'css-font-loading interfaces');
|
|
</script>
|