Bug 1473115 [wpt PR 9778] - Update the orientation-event IDL file, a=testonly
authorLuke Bjerring <lukebjerring@users.noreply.github.com>
Fri, 06 Jul 2018 21:43:30 +0000
changeset 425998 1ceb5aaf5ebc65a69b465e0026cf461062331f93
parent 425997 8c42f515c0e37082762d79a2bcc9a5ecd7c0f7db
child 425999 fe0d3bf9cdd288cdb4914033e9887750d870e9a7
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
bugs1473115
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 1473115 [wpt PR 9778] - Update the orientation-event IDL file, a=testonly Automatic update from web-platform-testsUpdate the orientation-event IDL file (#9778) -- wpt-commits: 5ec42d40b2a49310976996ed6d0d316b82571a3f wpt-pr: 9778
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/interfaces/orientation-event.idl
testing/web-platform/tests/orientation-event/idlharness.html
testing/web-platform/tests/orientation-event/idlharness.window.js
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -288879,16 +288879,21 @@
      {}
     ]
    ],
    "interfaces/mediasession.idl": [
     [
      {}
     ]
    ],
+   "interfaces/orientation-event.idl": [
+    [
+     {}
+    ]
+   ],
    "interfaces/orientation-sensor.idl": [
     [
      {}
     ]
    ],
    "interfaces/payment-handler.idl": [
     [
      {}
@@ -365098,19 +365103,19 @@
     ]
    ],
    "orientation-event/deviceorientationevent-init.html": [
     [
      "/orientation-event/deviceorientationevent-init.html",
      {}
     ]
    ],
-   "orientation-event/idlharness.html": [
-    [
-     "/orientation-event/idlharness.html",
+   "orientation-event/idlharness.window.js": [
+    [
+     "/orientation-event/idlharness.window.html",
      {}
     ]
    ],
    "orientation-sensor/AbsoluteOrientationSensor-disabled-by-feature-policy.https.html": [
     [
      "/orientation-sensor/AbsoluteOrientationSensor-disabled-by-feature-policy.https.html",
      {}
     ]
@@ -592075,16 +592080,20 @@
   "interfaces/mediacapture-record.idl": [
    "2af81807d578af4bfec67e58aeb17fa194bf83b4",
    "support"
   ],
   "interfaces/mediasession.idl": [
    "7cbe73f7f563ee45772bb466ce63e16a549548d3",
    "support"
   ],
+  "interfaces/orientation-event.idl": [
+   "0188bd03cdd323e354e8e7c3d279c6983f701378",
+   "support"
+  ],
   "interfaces/orientation-sensor.idl": [
    "1f0698a8611726b1ba724a5d7a0961e836c7b07e",
    "support"
   ],
   "interfaces/payment-handler.idl": [
    "6d9157e515e419c7a2fffc61a1f8e3b23a4550ba",
    "support"
   ],
@@ -602111,18 +602120,18 @@
   "orientation-event/free-fall-manual.html": [
    "e291465a89d97156f518e12e1bf65e6ab8091ce7",
    "manual"
   ],
   "orientation-event/horizontal-surface-manual.html": [
    "ef54a144013c5eb07a1c5742d8239e741a2a18dc",
    "manual"
   ],
-  "orientation-event/idlharness.html": [
-   "0e9e6441b4ccbf7618b21fdb5a02f9fa8fab87dd",
+  "orientation-event/idlharness.window.js": [
+   "824ae0a40b84ce1746f813cd16be75e550f2bd6c",
    "testharness"
   ],
   "orientation-event/screen-upmost-manual.html": [
    "2842c8cce38c52b44779debd172ec06acf1a6bed",
    "manual"
   ],
   "orientation-event/screen-upright-manual.html": [
    "6b5ad2a9357f9d2dcb320b8b20ae853aa5decbb1",
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/interfaces/orientation-event.idl
@@ -0,0 +1,68 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content of this file was automatically extracted from the
+// "DeviceOrientation Event Specification" spec.
+// See: https://w3c.github.io/deviceorientation/spec-source-orientation.html
+
+partial interface Window {
+      attribute EventHandler ondeviceorientation;
+    };
+
+    [Constructor(DOMString type, optional DeviceOrientationEventInit eventInitDict), Exposed=Window]
+    interface DeviceOrientationEvent : Event {
+      readonly attribute double? alpha;
+      readonly attribute double? beta;
+      readonly attribute double? gamma;
+      readonly attribute boolean absolute;
+    };
+
+    dictionary DeviceOrientationEventInit : EventInit {
+      double? alpha = null;
+      double? beta = null;
+      double? gamma = null;
+      boolean absolute = false;
+    };
+
+    partial interface Window {
+      attribute EventHandler ondevicemotion;
+    };
+
+    [NoInterfaceObject]
+    interface DeviceAcceleration {
+      readonly attribute double? x;
+      readonly attribute double? y;
+      readonly attribute double? z;
+    };
+
+    [NoInterfaceObject]
+    interface DeviceRotationRate {
+      readonly attribute double? alpha;
+      readonly attribute double? beta;
+      readonly attribute double? gamma;
+    };
+
+    [Constructor(DOMString type, optional DeviceMotionEventInit eventInitDict), Exposed=Window]
+    interface DeviceMotionEvent : Event {
+      readonly attribute DeviceAcceleration? acceleration;
+      readonly attribute DeviceAcceleration? accelerationIncludingGravity;
+      readonly attribute DeviceRotationRate? rotationRate;
+      readonly attribute double interval;
+    };
+
+    dictionary DeviceAccelerationInit {
+      double? x = null;
+      double? y = null;
+      double? z = null;
+    };
+
+    dictionary DeviceRotationRateInit {
+      double? alpha = null;
+      double? beta = null;
+      double? gamma = null;
+    };
+
+    dictionary DeviceMotionEventInit : EventInit {
+      DeviceAccelerationInit? acceleration;
+      DeviceAccelerationInit? accelerationIncludingGravity;
+      DeviceRotationRateInit? rotationRate;
+      double interval = 0;
+    };
deleted file mode 100644
--- a/testing/web-platform/tests/orientation-event/idlharness.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8" />
-<title>DeviceOrientation Event IDL tests</title>
-<link rel="author" title="Intel" href="http://www.intel.com">
-<link rel="help" href="http://dev.w3.org/geo/api/spec-source-orientation.html">
-<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 type="text/plain" id="untested_idl">
-interface Event {
-};
-
-interface EventHandler {
-};
-
-dictionary EventInit {
-};
-
-interface Window {
-};
-</script>
-
-<script type="text/plain" id="idl">
-partial interface Window {
-  attribute EventHandler ondeviceorientation;
-  attribute EventHandler ondevicemotion;
-};
-
-[Constructor(DOMString type, optional DeviceOrientationEventInit eventInitDict)]
-interface DeviceOrientationEvent : Event {
-  readonly attribute double? alpha;
-  readonly attribute double? beta;
-  readonly attribute double? gamma;
-  readonly attribute boolean absolute;
-};
-
-dictionary DeviceOrientationEventInit : EventInit {
-  double? alpha = null;
-  double? beta = null;
-  double? gamma = null;
-  boolean absolute = false;
-};
-
-[NoInterfaceObject]
-interface DeviceAcceleration {
-  readonly attribute double? x;
-  readonly attribute double? y;
-  readonly attribute double? z;
-};
-
-[NoInterfaceObject]
-interface DeviceRotationRate {
-  readonly attribute double? alpha;
-  readonly attribute double? beta;
-  readonly attribute double? gamma;
-};
-
-[Constructor(DOMString type, optional DeviceMotionEventInit eventInitDict)]
-interface DeviceMotionEvent : Event {
-  readonly attribute DeviceAcceleration? acceleration;
-  readonly attribute DeviceAcceleration? accelerationIncludingGravity;
-  readonly attribute DeviceRotationRate? rotationRate;
-  readonly attribute double interval;
-};
-
-dictionary DeviceAccelerationInit {
-  double? x = null;
-  double? y = null;
-  double? z = null;
-};
-
-dictionary DeviceRotationRateInit {
-  double? alpha = null;
-  double? beta  = null;
-  double? gamma = null;
-};
-
-dictionary DeviceMotionEventInit : EventInit {
-  DeviceAcceleration? acceleration;
-  DeviceAcceleration? accelerationIncludingGravity;
-  DeviceRotationRate? rotationRate;
-  double interval = 0;
-};
-</script>
-
-<script>
-"use strict";
-var idl_array = new IdlArray();
-
-idl_array.add_untested_idls(document.getElementById("untested_idl").textContent);
-idl_array.add_idls(document.getElementById("idl").textContent);
-
-idl_array.add_objects({
-  DeviceOrientationEvent: ['new DeviceOrientationEvent("foo")'],
-  DeviceMotionEvent: ['new DeviceMotionEvent("foo")'],
-});
-
-idl_array.test();
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/orientation-event/idlharness.window.js
@@ -0,0 +1,23 @@
+// META: script=/resources/WebIDLParser.js
+// META: script=/resources/idlharness.js
+
+// https://w3c.github.io/deviceorientation/spec-source-orientation.html
+
+'use strict';
+
+promise_test(async () => {
+  const idl = await fetch('/interfaces/orientation-event.idl').then(r => r.text());
+  const dom = await fetch('/interfaces/dom.idl').then(r => r.text());
+  const html = await fetch('/interfaces/html.idl').then(r => r.text());
+
+  var idl_array = new IdlArray();
+  idl_array.add_idls(idl);
+  idl_array.add_dependency_idls(html);
+  idl_array.add_dependency_idls(dom);
+  idl_array.add_objects({
+    Window: ['window'],
+    DeviceOrientationEvent: ['new DeviceOrientationEvent("foo")'],
+    DeviceMotionEvent: ['new DeviceMotionEvent("foo")'],
+  });
+  idl_array.test();
+}, 'orientation-event interfaces');