Bug 1603109 [wpt PR 20721] - [Rollback] Fix crash when removing a track being rolled back., a=testonly
authorHenrik Boström <hbos@chromium.org>
Thu, 12 Dec 2019 10:17:37 +0000
changeset 507216 3219fc97d87f518517193750633deff6fddc880e
parent 507215 614b53eb6c35624deeca348df8883a5c1b62bd9c
child 507217 9371ed11e8f6975180647ac24191d302972613b5
push id36923
push userccoroiu@mozilla.com
push dateMon, 16 Dec 2019 21:47:33 +0000
treeherdermozilla-central@c238b47d7d57 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1603109, 20721, 1029641, 1962245, 723833
milestone73.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 1603109 [wpt PR 20721] - [Rollback] Fix crash when removing a track being rolled back., a=testonly Automatic update from web-platform-tests [Rollback] Fix crash when removing a track being rolled back. Fixes https://crbug.com/1029641 and adds WPT test coverage. Spec for removeTrack, which explicitly handles removeTrack by aborting: https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-removetrack Bug: 1029641 Change-Id: I2c52e6711d34e0be25fad2681457eaf1eccc8f7f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1962245 Commit-Queue: Henrik Boström <hbos@chromium.org> Reviewed-by: Guido Urdaneta <guidou@chromium.org> Cr-Commit-Position: refs/heads/master@{#723833} -- wpt-commits: 3db20d26c0242bcf98088d7da5a33c43dce0fde4 wpt-pr: 20721
testing/web-platform/tests/webrtc/RTCPeerConnection-setRemoteDescription-rollback.html
--- a/testing/web-platform/tests/webrtc/RTCPeerConnection-setRemoteDescription-rollback.html
+++ b/testing/web-platform/tests/webrtc/RTCPeerConnection-setRemoteDescription-rollback.html
@@ -533,9 +533,22 @@
     assert_equals(remoteStreams.length, 3);
     assert_equals(remoteStreams[0].id, remoteStreams[2].id);
     assert_equals(remoteStreams[1].getTracks().length, 0);
     assert_equals(remoteStreams[2].getTracks().length, 1);
     assert_equals(remoteStreams[2].getTracks()[0].id, track.id);
 
   }, "rollback of a remote offer with stream changes");
 
+  promise_test(async t => {
+    const pc1 = new RTCPeerConnection();
+    t.add_cleanup(() => pc1.close());
+    const pc2 = new RTCPeerConnection();
+    t.add_cleanup(() => pc2.close());
+    pc2.addTransceiver('audio');
+    const offer = await pc2.createOffer();
+    await pc1.setRemoteDescription(offer);
+    const [transceiver] = pc1.getTransceivers();
+    pc1.setRemoteDescription({type:'rollback'});
+    pc1.removeTrack(transceiver.sender);
+  }, 'removeTrack() with a sender being rolled back does not crash or throw');
+
 </script>