https://github.com/web-platform-tests/wpt
Raw File
Tip revision: f941f71d5aae723c2204aa8c1024280b9ecab055 authored by Sam Goto on 18 December 2018, 20:56:38 UTC
Idle Detection API: Prototype
Tip revision: f941f71
idlharness.https.window.js
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js

// https://w3c.github.io/mediacapture-output/

'use strict';

promise_test(async () => {
  const srcs = ['audio-output', 'dom', 'html'];
  const [idl, dom, html] = await Promise.all(
    srcs.map(i => fetch(`/interfaces/${i}.idl`).then(r => r.text())));

  const idl_array = new IdlArray();
  idl_array.add_idls(idl);
  idl_array.add_dependency_idls(html);
  idl_array.add_dependency_idls(dom);
  self.audio = document.createElement('audio');
  self.video = document.createElement('video');
  idl_array.add_objects({
    HTMLAudioElement: ['audio'],
    HTMLVideoElement: ['video']
  });
  idl_array.test();
}, 'Test IDL implementation of audio-output API');
back to top