зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1826537 - Part 3: Add WebTransport stream test for being closed with no data r=smaug
To make sure the refactoring doesn't break it. Differential Revision: https://phabricator.services.mozilla.com/D175254
This commit is contained in:
Родитель
d4669f4fac
Коммит
ede5a7632c
|
@ -21,6 +21,9 @@
|
|||
[Transfer large chunks of data on a unidirectional stream]
|
||||
expected: [PASS, TIMEOUT, NOTRUN]
|
||||
|
||||
[Closing the stream with no data still resolves the read request]
|
||||
expected: [PASS, TIMEOUT, NOTRUN]
|
||||
|
||||
|
||||
[streams-echo.https.any.worker.html]
|
||||
expected: [OK, TIMEOUT]
|
||||
|
@ -45,6 +48,9 @@
|
|||
[Transfer large chunks of data on a unidirectional stream]
|
||||
expected: [PASS, TIMEOUT, NOTRUN]
|
||||
|
||||
[Closing the stream with no data still resolves the read request]
|
||||
expected: [PASS, TIMEOUT, NOTRUN]
|
||||
|
||||
|
||||
[streams-echo.https.any.sharedworker.html]
|
||||
expected: [OK, TIMEOUT]
|
||||
|
@ -69,6 +75,9 @@
|
|||
[Transfer large chunks of data on a unidirectional stream]
|
||||
expected: [PASS, TIMEOUT, NOTRUN]
|
||||
|
||||
[Closing the stream with no data still resolves the read request]
|
||||
expected: [PASS, TIMEOUT, NOTRUN]
|
||||
|
||||
|
||||
[streams-echo.https.any.serviceworker.html]
|
||||
expected: [OK, TIMEOUT]
|
||||
|
@ -92,3 +101,6 @@
|
|||
|
||||
[Transfer large chunks of data on a unidirectional stream]
|
||||
expected: [PASS, TIMEOUT, NOTRUN]
|
||||
|
||||
[Closing the stream with no data still resolves the read request]
|
||||
expected: [PASS, TIMEOUT, NOTRUN]
|
||||
|
|
|
@ -213,3 +213,21 @@ promise_test(async t => {
|
|||
assert_equals(len, 3*bytes.length);
|
||||
}, 'Transfer large chunks of data on a unidirectional stream');
|
||||
|
||||
promise_test(async t => {
|
||||
// Establish a WebTransport session.
|
||||
const wt = new WebTransport(webtransport_url('echo.py'));
|
||||
await wt.ready;
|
||||
|
||||
// Create a bidirectional stream.
|
||||
const bidi_stream = await wt.createBidirectionalStream();
|
||||
|
||||
// Close the writable end with no data at all.
|
||||
const writer = bidi_stream.writable.getWriter();
|
||||
writer.close();
|
||||
|
||||
// Read the data on the readable end.
|
||||
const chunks = await read_stream(bidi_stream.readable);
|
||||
assert_equals(chunks.length, 0);
|
||||
|
||||
await bidi_stream.readable.closed;
|
||||
}, 'Closing the stream with no data still resolves the read request');
|
||||
|
|
Загрузка…
Ссылка в новой задаче