Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444

This commit is contained in:
Josh Matthews 2017-04-17 12:06:02 +10:00 committed by Anthony Ramine
parent 25e8bf69e6
commit 665817d2a6
35333 changed files with 1818077 additions and 16036 deletions

View file

@ -71,19 +71,48 @@ promise_test(t => {
});
const ws = recordingWritableStream();
const writer = ws.getWriter();
writer.close();
const closePromise = writer.close();
writer.releaseLock();
return promise_rejects(t, error1, rs.pipeTo(ws), 'pipeTo must reject with the readable stream\'s error').then(() => {
assert_array_equals(rs.events, []);
assert_array_equals(ws.events, ['close']);
assert_array_equals(ws.events, ['abort', error1]);
return Promise.all([
promise_rejects(t, error1, rs.getReader().closed, 'the readable stream must be errored with error1'),
ws.getWriter().closed
promise_rejects(t, new TypeError(), ws.getWriter().closed,
'closed must reject with a TypeError indicating the writable stream was aborted'),
promise_rejects(t, new TypeError(), closePromise,
'close() must reject with a TypeError indicating the writable stream was aborted'),
]);
});
}, 'Piping from an errored readable stream to a closing writable stream');
promise_test(t => {
const rs = recordingReadableStream({
start(c) {
c.error(error1);
}
});
const ws = recordingWritableStream();
const writer = ws.getWriter();
const closePromise = writer.close();
writer.releaseLock();
return flushAsyncEvents().then(() => {
return promise_rejects(t, error1, rs.pipeTo(ws), 'pipeTo must reject with the readable stream\'s error').then(() => {
assert_array_equals(rs.events, []);
assert_array_equals(ws.events, ['close']);
return Promise.all([
promise_rejects(t, error1, rs.getReader().closed, 'the readable stream must be errored with error1'),
ws.getWriter().closed,
closePromise
]);
});
});
}, 'Piping from an errored readable stream to a closed writable stream');
promise_test(t => {