Files
sousa-gecko/testing/web-platform/tests/webtransport/idlharness.https.sub.any.js
T
Sam Sneddon 1232951df7 Bug 2023329 [wpt PR 58491] - [WebTransport] Use host substitution instead of hardcoded example.com, a=testonly
Automatic update from web-platform-tests
[WebTransport] Use host substitution instead of hardcoded example.com

This gives us a stronger guarantee that we don't accidentally try to
connect to example.com, which we really don't want to do.

--

wpt-commits: e44d67dce005f1e4ffaadc11765a2336bab3041e
wpt-pr: 58491
2026-03-30 08:05:07 +00:00

25 lines
732 B
JavaScript

// META: global=window,worker
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
'use strict';
idl_test(
['webtransport'],
['webidl', 'streams'],
idl_array => {
idl_array.add_objects({
WebTransport: ['webTransport'],
// TODO: The stream APIs below require a working connection to create.
// BidirectionalStream
// SendStream
// ReceiveStream
});
self.webTransport = new WebTransport("https://{{domains[nonexistent]}}/");
// `ready` and `closed` promises will be rejected due to connection error.
// Catches them to avoid unhandled rejections.
self.webTransport.ready.catch(() => {});
self.webTransport.closed.catch(() => {});
}
);