Bug 1507228 [wpt PR 14054] - webrtc: add test for legacy default stream, a=testonly
authorPhilipp Hancke <fippo@appear.in>
Thu, 22 Nov 2018 10:34:39 +0000
changeset 507135 828269b597ba3112bb72c961d02b9a4ac3e6c02f
parent 507134 59c8ec95baa39ba312681c2840f00e9194c6e3b2
child 507136 1b37261649fee3b6c5d84c4cd22f842fe1419a45
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1507228, 14054
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1507228 [wpt PR 14054] - webrtc: add test for legacy default stream, a=testonly Automatic update from web-platform-testswebrtc: add test for legacy default stream adds a test covering the legacy behaviour of dealing with SDP not containing a a=msid lines. See also https://github.com/rtcweb-wg/jsep/issues/856 https://github.com/w3c/webrtc-pc/issues/2027 -- +jib codereview -- Merge pull request #14054 from fippo/default-stream-no-msid webrtc: add test for legacy default stream -- wpt-commits: e9bc1b1358accf5a7abd21155399845fdc891d37, 10fe925252eb0a9ff3d4915f342d2662ebe94e31, 83d75544ac1390cdca8a771267ec3d223cf43bbf wpt-pr: 14054
testing/web-platform/tests/webrtc/RTCPeerConnection-setRemoteDescription-nomsid.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/webrtc/RTCPeerConnection-setRemoteDescription-nomsid.html
@@ -0,0 +1,40 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>RTCPeerConnection.prototype.setRemoteDescription - legacy streams without a=msid lines</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+'use strict';
+
+const FINGERPRINT_SHA256 = '00:00:00:00:00:00:00:00:00:00:00:00:00' +
+    ':00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00';
+const ICEUFRAG = 'someufrag';
+const ICEPWD = 'somelongpwdwithenoughrandomness';
+const SDP_BOILERPLATE = 'v=0\r\n' +
+    'o=- 166855176514521964 2 IN IP4 127.0.0.1\r\n' +
+    's=-\r\n' +
+    't=0 0\r\n';
+const MINIMAL_AUDIO_MLINE =
+    'm=audio 9 UDP/TLS/RTP/SAVPF 111\r\n' +
+    'c=IN IP4 0.0.0.0\r\n' +
+    'a=rtcp:9 IN IP4 0.0.0.0\r\n' +
+    'a=ice-ufrag:' + ICEUFRAG + '\r\n' +
+    'a=ice-pwd:' + ICEPWD + '\r\n' +
+    'a=fingerprint:sha-256 ' + FINGERPRINT_SHA256 + '\r\n' +
+    'a=setup:actpass\r\n' +
+    'a=mid:0\r\n' +
+    'a=sendrecv\r\n' +
+    'a=rtcp-mux\r\n' +
+    'a=rtcp-rsize\r\n' +
+    'a=rtpmap:111 opus/48000/2\r\n';
+
+  promise_test(async t => {
+    const pc = new RTCPeerConnection();
+    t.add_cleanup(() => pc.close());
+
+    const haveOntrack = new Promise(r => pc.ontrack = r);
+    await pc.setRemoteDescription({type: 'offer', sdp: SDP_BOILERPLATE + MINIMAL_AUDIO_MLINE});
+    assert_equals((await haveOntrack).streams.length, 1);
+  }, 'setRemoteDescription with an SDP without a=msid lines triggers ontrack with a default stream.');
+
+</script>