Automatic update from web-platform-tests fetch: Add missing body mixin to content-encoding tests -- wpt-commits: ca9aa593362fb125d6db4022f18cf8fff73f8e5b wpt-pr: 52779 Differential Revision: https://phabricator.services.mozilla.com/D251823
18 lines
410 B
JavaScript
18 lines
410 B
JavaScript
// META: global=window
|
|
|
|
[
|
|
"arrayBuffer",
|
|
"blob",
|
|
"bytes",
|
|
"formData",
|
|
"json",
|
|
"text"
|
|
].forEach(method => {
|
|
promise_test(t => {
|
|
return fetch("resources/bad-br-body.py").then(res => {
|
|
assert_equals(res.status, 200);
|
|
return promise_rejects_js(t, TypeError, res[method]());
|
|
});
|
|
}, "Consuming the body of a resource with bad br content with " + method + "() should reject");
|
|
});
|