summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webtransport/idlharness.https.any.js
blob: 248bc41abe5565408056ba4bddaac29ebb6f5a9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// 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://example.com/");
    // `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(() => {});
  }
);