Bug 1477236 [wpt PR 12090] - Simplify accelerometer IDL test, a=testonly
authorLuke Bjerring <lukebjerring@users.noreply.github.com>
Wed, 25 Jul 2018 18:43:16 +0000
changeset 824156 a9db9ea4ca651748c15eaf87961faf9921de712f
parent 824155 442d778056bbfcbe81212dc9fc712243663ce77d
child 824157 8d16fdfe7e9bcaf8ab00febe1632a04980b6899b
push id117837
push userbmo:aryx.bugmail@gmx-topmail.de
push dateMon, 30 Jul 2018 09:42:15 +0000
reviewerstestonly
bugs1477236, 12090
milestone63.0a1
Bug 1477236 [wpt PR 12090] - Simplify accelerometer IDL test, a=testonly Automatic update from web-platform-testsSimplify accelerometer IDL test (#12090) -- wpt-commits: 6c8ab50032102497ddeb535e2fb0cda835056b89 wpt-pr: 12090
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/accelerometer/idlharness.https.html
testing/web-platform/tests/accelerometer/idlharness.https.window.js
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -310916,19 +310916,19 @@
     ]
    ],
    "accelerometer/Accelerometer_insecure_context.html": [
     [
      "/accelerometer/Accelerometer_insecure_context.html",
      {}
     ]
    ],
-   "accelerometer/idlharness.https.html": [
-    [
-     "/accelerometer/idlharness.https.html",
+   "accelerometer/idlharness.https.window.js": [
+    [
+     "/accelerometer/idlharness.https.window.html",
      {}
     ]
    ],
    "acid/acid3/numbered-tests.html": [
     [
      "/acid/acid3/numbered-tests.html",
      {
       "timeout": "long"
@@ -416665,18 +416665,18 @@
   "accelerometer/LinearAccelerationSensor-shake-threshold-manual.https.html": [
    "30e8588ff49a1d526d65aac89bc80f4782715914",
    "manual"
   ],
   "accelerometer/META.yml": [
    "0b1b8f63953727301a4f44e34c2b5ebe71468b78",
    "support"
   ],
-  "accelerometer/idlharness.https.html": [
-   "93a78732bf63dcdd30ca1004f7ab850d5e7faaae",
+  "accelerometer/idlharness.https.window.js": [
+   "80f5c68be13e93686b4851871cc115bad160b633",
    "testharness"
   ],
   "accname/META.yml": [
    "f7d5179a9a285a89bf67e94235655e0a41c882f4",
    "support"
   ],
   "accname/description_1.0_combobox-focusable-manual.html": [
    "942ce0107f0a19b99abb5caf186a7e89838daabf",
deleted file mode 100644
--- a/testing/web-platform/tests/accelerometer/idlharness.https.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Accelerometer Sensor IDL tests</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<link rel="help" href="https://w3c.github.io/accelerometer/">
-<link rel="help" href="https://w3c.github.io/sensors/">
-<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";
-
-function doTest([dom, generic_sensor, accelerometer]) {
-  const idl_array = new IdlArray();
-  idl_array.add_untested_idls(dom);
-  idl_array.add_untested_idls('interface EventHandler {};');
-  idl_array.add_idls(generic_sensor, { only: ['Sensor', 'SensorOptions'] });
-  idl_array.add_idls(accelerometer);
-  idl_array.add_objects({
-    Accelerometer: ['new Accelerometer();'],
-    LinearAccelerationSensor: ['new LinearAccelerationSensor();'],
-    GravitySensor: ['new GravitySensor();']
-  });
-  idl_array.test();
-}
-
-function fetchText(url) {
-  return fetch(url).then((response) => response.text());
-}
-
-promise_test(() => {
-  return Promise.all([
-    "/interfaces/dom.idl",
-    "/interfaces/sensors.idl",
-    "/interfaces/accelerometer.idl",
-  ].map(fetchText)).then(doTest);
-}, "Test IDL implementation of Accelerometer Sensor");
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/accelerometer/idlharness.https.window.js
@@ -0,0 +1,19 @@
+// META: script=/resources/WebIDLParser.js
+// META: script=/resources/idlharness.js
+
+// https://w3c.github.io/accelerometer/
+
+"use strict";
+
+idl_test(
+  ['accelerometer'],
+  ['generic-sensor', 'dom'],
+  idl_array => {
+    idl_array.add_objects({
+      Accelerometer: ['new Accelerometer();'],
+      LinearAccelerationSensor: ['new LinearAccelerationSensor();'],
+      GravitySensor: ['new GravitySensor();']
+    });
+  },
+  'Test IDL implementation of Accelerometer Sensor'
+);