Revision c6e42ae9ffe6cddd051c82b3fe0cb982f5861032 authored by Robert Ma on 22 March 2018, 19:02:06 UTC, committed by Robert Ma on 22 March 2018, 19:03:42 UTC
1 parent 9e22798
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>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...