mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 19:25:43 +00:00
Bug 1473594 [wpt PR 9771] - Clean up the css-font-loading IDL test, a=testonly
Automatic update from web-platform-testsClean up the css-font-loading IDL test (#9771) -- wpt-commits: 5c05fc07d58b1352de26f62434103c8ec3941749 wpt-pr: 9771
This commit is contained in:
parent
735ea9d4cf
commit
f1d098ff36
@ -512493,7 +512493,7 @@
|
|||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"css/css-font-loading/idlharness.https.html": [
|
"css/css-font-loading/idlharness.https.html": [
|
||||||
"00399ffcb0ff8000e79ab4aeefdb90cabdb0fd4d",
|
"93c01c16bf27adc0789dda15dd2e704b96715415",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"css/css-fonts/META.yml": [
|
"css/css-fonts/META.yml": [
|
||||||
@ -593653,7 +593653,7 @@
|
|||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
"interfaces/css-font-loading.idl": [
|
"interfaces/css-font-loading.idl": [
|
||||||
"9f2f252c5b63c159d9680de46a932bfa4335bf11",
|
"5859e4051abccfcc6158e8731e82da1453fcafb9",
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
"interfaces/css-fonts.idl": [
|
"interfaces/css-fonts.idl": [
|
||||||
|
@ -6,25 +6,24 @@
|
|||||||
<script src="/resources/WebIDLParser.js"></script>
|
<script src="/resources/WebIDLParser.js"></script>
|
||||||
<script src="/resources/idlharness.js"></script>
|
<script src="/resources/idlharness.js"></script>
|
||||||
<script>
|
<script>
|
||||||
"use strict";
|
'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())));
|
||||||
|
|
||||||
function doTest([dom, cssfontloading]) {
|
|
||||||
const idl_array = new IdlArray();
|
const idl_array = new IdlArray();
|
||||||
idl_array.add_untested_idls(dom);
|
|
||||||
idl_array.add_untested_idls("[Exposed=Worker] interface WorkerGlobalScope : EventTarget { };");
|
|
||||||
idl_array.add_objects({Document: ["document"]});
|
|
||||||
idl_array.add_idls(cssfontloading);
|
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();
|
idl_array.test();
|
||||||
}
|
}, 'css-font-loading interfaces');
|
||||||
|
|
||||||
function fetchText(url) {
|
|
||||||
return fetch(url).then((response) => response.text());
|
|
||||||
}
|
|
||||||
|
|
||||||
promise_test(() => {
|
|
||||||
return Promise.all([
|
|
||||||
"/interfaces/dom.idl",
|
|
||||||
"/interfaces/css-font-loading.idl",
|
|
||||||
].map(fetchText)).then(doTest);
|
|
||||||
}, "Test IDL implementation of CSS Font Loading");
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,8 +1,3 @@
|
|||||||
// GENERATED CONTENT - DO NOT EDIT
|
|
||||||
// Content of this file was automatically extracted from the
|
|
||||||
// "CSS Font Loading Module Level 3" spec.
|
|
||||||
// See: https://drafts.csswg.org/css-font-loading/
|
|
||||||
|
|
||||||
typedef (ArrayBuffer or ArrayBufferView) BinaryData;
|
typedef (ArrayBuffer or ArrayBufferView) BinaryData;
|
||||||
|
|
||||||
dictionary FontFaceDescriptors {
|
dictionary FontFaceDescriptors {
|
||||||
@ -89,3 +84,4 @@ interface FontFaceSource {
|
|||||||
|
|
||||||
Document implements FontFaceSource;
|
Document implements FontFaceSource;
|
||||||
WorkerGlobalScope implements FontFaceSource;
|
WorkerGlobalScope implements FontFaceSource;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user