Automatic update from web-platform-tests [WebTransport] csp-pass shouldn't use otherwise unused constant -- [WebTransport] webtransport-test-helpers.sub.js should consistently use substitution -- [WebTransport] Remove unused get-host-info.sub.js script references -- wpt-commits: c917f34063b6a250104c6b8c49c0bde54fbb8494, 6f69158edd3bde1921c6ef0bb4f12cca32da352a, 21e33728fdb8a8b53b085edb2777cf6e5716243d wpt-pr: 58563
24 lines
749 B
HTML
24 lines
749 B
HTML
<!DOCTYPE html>
|
|
<meta charset="utf-8">
|
|
<html class="test-wait">
|
|
<script src="resources/webtransport-test-helpers.sub.js"></script>
|
|
<script type="module">
|
|
const WT_CODE = 127;
|
|
const HTTP_CODE = webtransport_code_to_http_code(WT_CODE);
|
|
const wt = new WebTransport(
|
|
webtransport_url(`abort-stream-from-server.py?code=${HTTP_CODE}`));
|
|
await wt.ready;
|
|
|
|
const bidi = await wt.createBidirectionalStream();
|
|
const writer = bidi.writable.getWriter();
|
|
|
|
const reader = bidi.readable.getReader();
|
|
reader.read();
|
|
|
|
// Write something, to make the stream visible to the server side.
|
|
await writer.write(new Uint8Array([64]));
|
|
|
|
const e = await reader.closed.catch(e => e);
|
|
document.documentElement.classList.remove("test-wait");
|
|
</script>
|