summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webrtc-identity/idlharness.https.window.js
blob: 8eb60c960aa00b7282c0b4b094f6cda18f182e7e (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: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js

'use strict';

idl_test(
  ['webrtc-identity'],
  ['webrtc', 'mediacapture-streams', 'html', 'dom', 'webidl'],
  async idlArray => {
    idlArray.add_objects({
      RTCPeerConnection: [`new RTCPeerConnection()`],
      RTCIdentityAssertion: [`new RTCIdentityAssertion('idp', 'name')`],
      MediaStreamTrack: ['track'],
      // TODO: RTCIdentityProviderGlobalScope
      // TODO: RTCIdentityProviderRegistrar
    });

    try {
      self.track = await navigator.mediaDevices
          .getUserMedia({audio: true})
          .then(m => m.getTracks()[0]);
    } catch (e) {}
  }
);