summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/generic-sensor/idlharness.https.window.js
blob: db932f35c0d5193e1ace443833ba0019c61dc459 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js

// https://w3c.github.io/sensors/

'use strict';

function cast(i, t) {
  return Object.assign(Object.create(t.prototype), i);
}

idl_test(
  ['generic-sensor'],
  ['dom', 'html', 'webidl'],
  idl_array => {
    idl_array.add_objects({
      Sensor: ['cast(new Accelerometer(), Sensor)'],
      SensorErrorEvent: [
        'new SensorErrorEvent("error", { error: new DOMException });'
      ],
    });
  }
);