Bug 1467967 [wpt PR 11444] - Clean up mediasession idl test, a=testonly
authorLuke Bjerring <lukebjerring@users.noreply.github.com>
Mon, 02 Jul 2018 17:43:12 +0000
changeset 814273 c12bdcb485d668e8f493a8f9bae2d5b3df6a7cce
parent 814272 60574da857c725b56974a6e34bd59961fc49ac65
child 814274 9d565e7414c0228efd6bd375325e9a5ba8b38ee6
push id115144
push userbmo:gl@mozilla.com
push dateWed, 04 Jul 2018 20:51:10 +0000
reviewerstestonly
bugs1467967, 11444
milestone63.0a1
Bug 1467967 [wpt PR 11444] - Clean up mediasession idl test, a=testonly Automatic update from web-platform-testsClean up mediasession idl test -- wpt-commits: 88e6a3580ec114b52e29f3a7d836d7a8ce67139b wpt-pr: 11444
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/mediasession/idlharness.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -590533,17 +590533,17 @@
    "4704befc950341a16c061872e3d57fe9f0f743bf",
    "support"
   ],
   "mediasession/README.md": [
    "5ceecb2611837e6c52a303cec32d8cb9fabe93a6",
    "support"
   ],
   "mediasession/idlharness.html": [
-   "96a3bd3eb15a373ca1c68d528ff6514b3d7cddc1",
+   "e5b4267255f62b4505b3c656d2b377380f8dfab5",
    "testharness"
   ],
   "mediasession/mediametadata.html": [
    "0f0c1f7e3b58321a76229fa5a93e80b6863f181f",
    "testharness"
   ],
   "mediasession/playbackstate.html": [
    "e9edd18778d437b039bc45f2e3f35db725528447",
--- a/testing/web-platform/tests/mediasession/idlharness.html
+++ b/testing/web-platform/tests/mediasession/idlharness.html
@@ -7,33 +7,26 @@
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="/resources/WebIDLParser.js"></script>
 <script src="/resources/idlharness.js"></script>
 </head>
 <body>
 <h1>Media Session IDL tests</h1>
 <script>
-"use strict";
+'use strict';
 
-function doTest([mediasession]) {
-    var idl_array = new IdlArray();
-    idl_array.add_untested_idls('interface Navigator {};');
-    idl_array.add_idls(mediasession);
-    idl_array.add_objects({
-      MediaMetadata: ["new MediaMetadata()"],
-      Navigator: ["navigator"]
-    });
-    idl_array.test();
-}
-
-function fetchText(url) {
-    return fetch(url).then((response) => response.text());
-}
-
-promise_test(() => {
-    return Promise.all(["/interfaces/mediasession.idl"].map(fetchText))
-                  .then(doTest);
-}, "Test IDL implementation of Media Session");
+promise_test(async () => {
+  var idl_array = new IdlArray();
+  const idl = await fetch('/interfaces/mediasession.idl').then(r => r.text());
+  const html = await fetch('/interfaces/html.idl').then(r => r.text());
+  idl_array.add_idls(idl);
+  idl_array.add_dependency_idls(html);
+  idl_array.add_objects({
+    MediaMetadata: ['new MediaMetadata()'],
+    Navigator: ['navigator']
+  });
+  idl_array.test();
+}, 'Test IDL implementation of Media Session');
 </script>
 <div id="log"></div>
 </body>
 </html>