Revision 3b57b118a10cc6ec05c8d7aeb30ec6faadc729ad authored by Josh Matthews on 26 March 2018, 14:23:24 UTC, committed by Josh Matthews on 26 March 2018, 14:47:13 UTC
1 parent f4388a3
interfaces.html
<!doctype html>
<meta charset=utf-8>
<title>XMLHttpRequest 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>
<h1>XMLHttpRequest IDL tests</h1>
<div id=log></div>
<script type=text/plain class=untested>
[TreatNonCallableAsNull]
callback EventHandlerNonNull = any (Event event);
typedef EventHandlerNonNull? EventHandler;
</script>
<script>
"use strict";
var form = document.createElement("form");
var idlArray = new IdlArray();
function doTest([domIdl, xhrIdl]) {
idlArray.add_untested_idls(domIdl);
var untestedIdl = document.querySelector("script.untested").textContent;
idlArray.add_untested_idls(untestedIdl);
idlArray.add_idls(xhrIdl);
idlArray.add_objects({
XMLHttpRequest: ['new XMLHttpRequest()'],
XMLHttpRequestUpload: ['(new XMLHttpRequest()).upload'],
FormData: ['new FormData()', 'new FormData(form)']
});
idlArray.test();
}
function fetchText(url) {
return fetch(url).then(response => response.text());
}
promise_test(() => {
return Promise.all(["/interfaces/dom.idl",
"/interfaces/xhr.idl"].map(fetchText))
.then(doTest);
}, "Test driver");
</script>
Computing file changes ...