https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 41f3538c0d392a6e2f5ca962527ec9fbcf4100fc authored by Philip Jägenstedt on 04 April 2018, 15:24:36 UTC
Simplify assert_throws in two places where error messages were passed
Tip revision: 41f3538
interfaces.html
<!DOCTYPE html>
<title>Fullscreen IDL tests</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/WebIDLParser.js></script>
<script src=/resources/idlharness.js></script>
<script>
"use strict";

function doTest([dom, fullscreen]) {
  var idlArray = new IdlArray();
  idlArray.add_untested_idls(dom);
  idlArray.add_untested_idls('interface EventHandler {};');
  idlArray.add_idls(fullscreen);
  idlArray.add_objects({
    Document: ['new Document'],
    Element: ['document.createElementNS(null, "test")'],
  });
  idlArray.test();
}

function fetchText(url) {
  return fetch(url).then((response) => response.text());
}

promise_test(() => {
  return Promise.all(["/interfaces/dom.idl",
                      "/interfaces/fullscreen.idl"].map(fetchText))
    .then(doTest);
}, "Test driver");
</script>
back to top