Update web-platform-tests to revision abd18b3e018d25ed668d179c905b7869dca5e239

This commit is contained in:
WPT Sync Bot 2018-07-19 21:07:28 -04:00
parent 908a642063
commit 158f7eec0e
117 changed files with 2997 additions and 434 deletions

View file

@ -3167,27 +3167,32 @@ IdlNamespace.prototype.test = function ()
* as adding objects. Do not call idl_array.test() in the setup; it is
* called by this function (idl_test).
*/
function idl_test(srcs, deps, setup_func, test_name) {
function idl_test(srcs, deps, idl_setup_func, test_name) {
return promise_test(function (t) {
var idl_array = new IdlArray();
srcs = (srcs instanceof Array) ? srcs : [srcs] || [];
deps = (deps instanceof Array) ? deps : [deps] || [];
return Promise.all(
srcs.concat(deps).map(function(i) {
return fetch('/interfaces/' + i + '.idl').then(function(r) {
srcs.concat(deps).map(function(spec) {
return fetch('/interfaces/' + spec + '.idl').then(function(r) {
return r.text();
});
})).then(function(idls) {
}))
.then(function(idls) {
for (var i = 0; i < srcs.length; i++) {
idl_array.add_idls(idls[i]);
}
for (var i = srcs.length; i < srcs.length + deps.length; i++) {
idl_array.add_dependency_idls(idls[i]);
}
if (setup_func) {
setup_func(idl_array)
};
idl_array.test();
})
.then(function() {
return idl_setup_func(idl_array, t);
})
.then(function() { idl_array.test(); })
.catch(function (reason) {
idl_array.test(); // Test what we can.
return Promise.reject(reason || 'IDL setup failed.');
});
}, test_name);
}