https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 937e5a795fd890bf2d3925589ae87313b6500549 authored by Raymond Toy on 28 June 2018, 17:31:35 UTC
Enable analyser tests to run with Chrome
Tip revision: 937e5a7
interfaces.window.js
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js

'use strict';

// https://w3c.github.io/pointerlock/

promise_test(async () => {
  const html = await fetch('/interfaces/html.idl').then(r => r.text());
  const dom = await fetch('/interfaces/dom.idl').then(r => r.text());
  const uievents = await fetch('/interfaces/uievents.idl').then(r => r.text());
  const idl = await fetch('/interfaces/pointerlock.idl').then(r => r.text());

  const idl_array = new IdlArray();
  idl_array.add_idls(idl);
  idl_array.add_dependency_idls(uievents);
  idl_array.add_dependency_idls(dom);
  idl_array.add_dependency_idls(html);

  idl_array.add_objects({
    Document: ["window.document"],
    Element: ["window.document.documentElement"],
    MouseEvent: ["new MouseEvent('foo')"]
  });
  idl_array.test();
}, 'pointerlock interfaces.');
back to top