From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- testing/web-platform/tests/generic-sensor/OWNERS | 4 + .../tests/generic-sensor/idlharness.html | 86 ++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 testing/web-platform/tests/generic-sensor/OWNERS create mode 100644 testing/web-platform/tests/generic-sensor/idlharness.html (limited to 'testing/web-platform/tests/generic-sensor') diff --git a/testing/web-platform/tests/generic-sensor/OWNERS b/testing/web-platform/tests/generic-sensor/OWNERS new file mode 100644 index 000000000..387490fd1 --- /dev/null +++ b/testing/web-platform/tests/generic-sensor/OWNERS @@ -0,0 +1,4 @@ +@zqzhang +@dontcallmedom +@tobie +@riju diff --git a/testing/web-platform/tests/generic-sensor/idlharness.html b/testing/web-platform/tests/generic-sensor/idlharness.html new file mode 100644 index 000000000..07a43cf1c --- /dev/null +++ b/testing/web-platform/tests/generic-sensor/idlharness.html @@ -0,0 +1,86 @@ + + +Generic Sensor IDL tests + + + + + + + +
+ +
+interface Event {
+};
+
+interface Error {
+};
+
+dictionary EventInit {
+};
+
+interface Sensor : EventTarget {
+  readonly attribute SensorState state;
+  readonly attribute SensorReading? reading;
+  void start();
+  void stop();
+  attribute EventHandler onchange;
+  attribute EventHandler onstatechange;
+  attribute EventHandler onerror;
+};
+
+dictionary SensorOptions {
+  double? frequency;
+};
+
+enum SensorState {
+  "idle",
+  "activating",
+  "active",
+  "errored"
+};
+
+interface SensorReading {
+  readonly attribute DOMHighResTimeStamp timeStamp;
+};
+
+[Constructor(DOMString type, SensorReadingEventInit eventInitDict)]
+interface SensorReadingEvent : Event {
+  readonly attribute SensorReading reading;
+};
+
+dictionary SensorReadingEventInit : EventInit {
+  SensorReading reading;
+};
+
+ +
+[Constructor(DOMString type, SensorErrorEventInit errorEventInitDict)]
+interface SensorErrorEvent : Event {
+  readonly attribute Error error;
+};
+
+dictionary SensorErrorEventInit : EventInit {
+  Error error;
+};
+
+ + \ No newline at end of file -- cgit v1.2.3