https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 829648dee8a4ea94b40c75e1b270b8ed9611bbd3 authored by Liam Quin on 25 June 2018, 19:13:57 UTC
Update META.yml
Tip revision: 829648d
idlharness.worker.js
importScripts("/resources/testharness.js");
importScripts("/resources/WebIDLParser.js", "/resources/idlharness.js");

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

  const idl_array = new IdlArray();
  idl_array.add_idls(idl);
  idl_array.add_dependency_idls(dom);
  idl_array.add_dependency_idls(html);
  idl_array.add_dependency_idls(url);
  idl_array.add_untested_idls("[Exposed=(Window,Worker)] interface ArrayBuffer {};");
  idl_array.add_objects({
    Blob: ['new Blob(["TEST"])'],
    File: ['new File(["myFileBits"], "myFileName")'],
    FileReader: ['new FileReader()'],
    FileReaderSync: ['new FileReaderSync()']
  });

  idl_array.test();
}, 'Test FileAPI IDL implementation');
done();
back to top