https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 638ed72053ec83d65076325790b7c618bf3a88dc authored by Geoffrey Sneddon on 26 September 2018, 10:38:29 UTC
Revert "Make wptrunner chrome always use the WebDriver executor (#13200)"
Tip revision: 638ed72
idlharness.https.window.js
// 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 });'
      ],
    });
  }
);
back to top