mirror of
https://github.com/servo/servo.git
synced 2025-08-18 03:45:33 +01:00
Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444
This commit is contained in:
parent
25e8bf69e6
commit
665817d2a6
35333 changed files with 1818077 additions and 16036 deletions
|
@ -424,4 +424,38 @@ promise_test(() => {
|
|||
|
||||
}, 'Closing must be propagated forward: shutdown must not occur until the final write completes');
|
||||
|
||||
promise_test(() => {
|
||||
|
||||
const rs = recordingReadableStream();
|
||||
|
||||
let resolveWritePromise;
|
||||
const ws = recordingWritableStream({
|
||||
write() {
|
||||
return new Promise(resolve => {
|
||||
resolveWritePromise = resolve;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
let pipeComplete = false;
|
||||
const pipePromise = rs.pipeTo(ws, { preventClose: true }).then(() => {
|
||||
pipeComplete = true;
|
||||
});
|
||||
|
||||
rs.controller.enqueue('a');
|
||||
rs.controller.close();
|
||||
|
||||
// Flush async events and verify that no shutdown occurs.
|
||||
return flushAsyncEvents().then(() => {
|
||||
assert_array_equals(ws.events, ['write', 'a'],
|
||||
'the chunk must have been written, but close must not have happened yet');
|
||||
assert_equals(pipeComplete, false, 'the pipe must not be complete');
|
||||
|
||||
resolveWritePromise();
|
||||
|
||||
return pipePromise;
|
||||
});
|
||||
|
||||
}, 'Closing must be propagated forward: shutdown must not occur until the final write completes; preventClose = true');
|
||||
|
||||
done();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue