Bug 1489056 [wpt PR 12870] - Don't try to parse the contents of server errors in idl_test()., a=testonly

Automatic update from web-platform-testsDon't try to parse the contents of server errors in idl_test().

--

wpt-commits: af65cfb6db68e2b3255290ce8ec362376eb44efa
wpt-pr: 12870
This commit is contained in:
Ms2ger 2018-09-26 10:46:28 +00:00 committed by moz-wptsync-bot
parent 08a608979c
commit 42c4aea55c

View File

@ -3250,7 +3250,11 @@ function idl_test(srcs, deps, idl_setup_func) {
* fetch_spec is a shorthand for a Promise that fetches the spec's content.
*/
function fetch_spec(spec) {
return fetch('/interfaces/' + spec + '.idl').then(function (r) {
var url = '/interfaces/' + spec + '.idl';
return fetch(url).then(function (r) {
if (!r.ok) {
throw new IdlHarnessError("Error fetching " + url + ".");
}
return r.text();
});
}