Commit 85cfd7b7 authored by Philipp Hancke's avatar Philipp Hancke Committed by Commit Bot

webrtc wpt: add test for reusing a transceiver in simulcast

adds a test case for
  https://github.com/w3c/webrtc-pc/pull/2155

BUG=944821

Change-Id: Idee2e83cd6dbd217802698db46fe94b6ca0f0791
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2059972Reviewed-by: default avatarHarald Alvestrand <hta@chromium.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#742134}
parent 4a50b8a1
This is a testharness.js-based test.
FAIL createAnswer() attaches to an existing transceiver with a remote simulcast offer assert_equals: Expected exactly one transceiver expected 1 but got 2
Harness: the test ran to completion.
<!doctype html>
<meta charset=utf-8>
<title>RTCPeerConnection.prototype.setRemoteDescription rollback</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="RTCPeerConnection-helper.js"></script>
<script>
'use strict';
// Test for https://github.com/w3c/webrtc-pc/pull/2155
promise_test(async t => {
const pc = new RTCPeerConnection();
t.add_cleanup(() => pc.close());
const [track, stream] = await getTrackFromUserMedia('video');
t.add_cleanup(() => track.stop());
pc.addTrack(track, stream);
const offer_sdp = `v=0
o=- 3840232462471583827 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0
a=msid-semantic: WMS
m=video 9 UDP/TLS/RTP/SAVPF 96
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:Li6+
a=ice-pwd:3C05CTZBRQVmGCAq7hVasHlT
a=ice-options:trickle
a=fingerprint:sha-256 5B:D3:8E:66:0E:7D:D3:F3:8E:E6:80:28:19:FC:55:AD:58:5D:B9:3D:A8:DE:45:4A:E7:87:02:F8:3C:0B:3B:B3
a=setup:actpass
a=mid:0
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=recvonly
a=rtcp-mux
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rid:foo recv
a=rid:bar recv
a=rid:baz recv
a=simulcast:recv foo;bar;baz
`;
await pc.setRemoteDescription({type: 'offer', sdp: offer_sdp});
const transceivers = pc.getTransceivers();
assert_equals(transceivers.length, 1, 'Expected exactly one transceiver');
}, 'createAnswer() attaches to an existing transceiver with a remote simulcast offer');
</script>
...@@ -58,5 +58,5 @@ a=simulcast:recv foo;bar;baz ...@@ -58,5 +58,5 @@ a=simulcast:recv foo;bar;baz
let result = answer_lines.find( let result = answer_lines.find(
line => line.startsWith(`a=simulcast:send ${expected_rids.join(';')}`)); line => line.startsWith(`a=simulcast:send ${expected_rids.join(';')}`));
assert_not_equals(result, undefined, "Could not find simulcast attribute."); assert_not_equals(result, undefined, "Could not find simulcast attribute.");
}, 'createOffer() with multiple send encodings should create simulcast offer'); }, 'createAnswer() with multiple send encodings should create simulcast answer');
</script> </script>
This is a testharness.js-based test.
FAIL createAnswer() attaches to an existing transceiver with a remote simulcast offer assert_equals: Expected exactly one transceiver expected 1 but got 0
Harness: the test ran to completion.
This is a testharness.js-based test. This is a testharness.js-based test.
FAIL createOffer() with multiple send encodings should create simulcast offer promise_test: Unhandled rejection with value: object "TypeError: Cannot set property 'direction' of undefined" FAIL createAnswer() with multiple send encodings should create simulcast answer promise_test: Unhandled rejection with value: object "TypeError: Cannot set property 'direction' of undefined"
Harness: the test ran to completion. Harness: the test ran to completion.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment