Bug 1473594 [wpt PR 9771] - Clean up the css-font-loading IDL test, a=testonly
authorLuke Bjerring <lukebjerring@users.noreply.github.com>
Sat, 07 Jul 2018 00:16:56 +0000
changeset 426142 ba688fc0671e7612cd2400bb00cdf326b4ef0fdc
parent 426141 a7fb46b792fa159beb63d29f900a7bc4268d6f19
child 426143 616b8723c4455aa6d50f0aeec7210c63bf41ca16
push id34267
push userrgurzau@mozilla.com
push dateWed, 11 Jul 2018 22:05:21 +0000
treeherdermozilla-central@3aca103e4915 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1473594
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/css/css-font-loading/idlharness.https.html
testing/web-platform/tests/interfaces/css-font-loading.idl
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -512488,17 +512488,17 @@
    "a566cf382313c5d808d636cfb9210aee8f387709",
    "support"
   ],
   "css/css-font-loading/fontfacesetloadevent-constructor.html": [
    "ad355c3d5220c1b938182241a8e8abe030ace699",
    "testharness"
   ],
   "css/css-font-loading/idlharness.https.html": [
-   "00399ffcb0ff8000e79ab4aeefdb90cabdb0fd4d",
+   "93c01c16bf27adc0789dda15dd2e704b96715415",
    "testharness"
   ],
   "css/css-fonts/META.yml": [
    "e254b7f4226a0263147746fd1108db8b78360a19",
    "support"
   ],
   "css/css-fonts/README": [
    "7134f9466636a2d729b84989a69b9c320925cfa7",
@@ -593648,17 +593648,17 @@
    "520ed1f6d245c75551aed3f74f988026edf3ff59",
    "support"
   ],
   "interfaces/css-conditional.idl": [
    "0019e54201874e5d2a2b10c887e44b8c42199c32",
    "support"
   ],
   "interfaces/css-font-loading.idl": [
-   "9f2f252c5b63c159d9680de46a932bfa4335bf11",
+   "5859e4051abccfcc6158e8731e82da1453fcafb9",
    "support"
   ],
   "interfaces/css-fonts.idl": [
    "ff2d83e9468c743993c9b4a1ecf3fab09684dc16",
    "support"
   ],
   "interfaces/css-masking.idl": [
    "5f4ed3d8922e30ab3ddb714d185c6e6f794e5a29",
--- a/testing/web-platform/tests/css/css-font-loading/idlharness.https.html
+++ b/testing/web-platform/tests/css/css-font-loading/idlharness.https.html
@@ -1,30 +1,29 @@
 <!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";
+'use strict';
 
-function doTest([dom, cssfontloading]) {
-  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.test();
-}
+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 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");
+  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>
--- a/testing/web-platform/tests/interfaces/css-font-loading.idl
+++ b/testing/web-platform/tests/interfaces/css-font-loading.idl
@@ -1,13 +1,8 @@
-// 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;
 
 dictionary FontFaceDescriptors {
   CSSOMString style = "normal";
   CSSOMString weight = "normal";
   CSSOMString stretch = "normal";
   CSSOMString unicodeRange = "U+0-10FFFF";
   CSSOMString variant = "normal";
@@ -84,8 +79,9 @@ interface FontFaceSet : EventTarget {
 [Exposed=(Window,Worker),
  NoInterfaceObject]
 interface FontFaceSource {
   readonly attribute FontFaceSet fonts;
 };
 
 Document implements FontFaceSource;
 WorkerGlobalScope implements FontFaceSource;
+