Skip to content

Commit

Permalink
webrtc wpt: add max-bundle test
Browse files Browse the repository at this point in the history
checking the
  If the remote endpoint is not bundle-aware,
  negotiate only one media track
condition of
  https://w3c.github.io/webrtc-pc/#dom-rtcbundlepolicy-max-bundle
Currently failing

BUG=webrtc:13274

Change-Id: I7e5272753a0b0d2b22c050851d1e5bb517fd04eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3222949
Reviewed-by: Harald Alvestrand <hta@chromium.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#931977}
  • Loading branch information
fippo authored and chromium-wpt-export-bot committed Oct 15, 2021
1 parent 53abeda commit b2f9540
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions webrtc/protocol/bundle.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,38 @@
assert_not_equals(dtlsTransports[1], secondTransport);
assert_equals(secondTransport.state, 'closed');
}, 'bundles on the first transport and closes the second');

promise_test(async t => {
const sdp = `v=0
o=- 0 3 IN IP4 127.0.0.1
s=-
t=0 0
a=fingerprint:sha-256 A7:24:72:CA:6E:02:55:39:BA:66:DF:6E:CC:4C:D8:B0:1A:BF:1A:56:65:7D:F4:03:AD:7E:77:43:2A:29:EC:93
a=ice-ufrag:ETEn
a=ice-pwd:OtSK0WpNtpUjkY4+86js7Z/l
m=audio 9 UDP/TLS/RTP/SAVPF 111
c=IN IP4 0.0.0.0
a=rtcp-mux
a=sendonly
a=mid:audio
a=rtpmap:111 opus/48000/2
a=setup:actpass
m=video 9 UDP/TLS/RTP/SAVPF 100
c=IN IP4 0.0.0.0
a=rtcp-mux
a=sendonly
a=mid:video
a=rtpmap:100 VP8/90000
a=fmtp:100 max-fr=30;max-fs=3600
a=setup:actpass
`;
const pc = new RTCPeerConnection({ bundlePolicy: 'max-bundle' });
t.add_cleanup(() => pc.close());
await pc.setRemoteDescription({ type: 'offer', sdp });
await pc.setLocalDescription();
const transceivers = pc.getTransceivers();
assert_equals(transceivers.length, 2);
assert_false(transceivers[0].stopped);
assert_true(transceivers[1].stopped);
}, 'max-bundle with an offer without bundle only negotiates the first m-line');
</script>

0 comments on commit b2f9540

Please sign in to comment.