Test for negotiating pre-stopped M-sections.
Fix for issue is in https://webrtc-review.googlesource.com/c/src/+/184343
Bug: chromium:1127625
Change-Id: I11bcde82b7e03a160b5ee078a9c5edf7f2e31902
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184344
Reviewed-by: Philipp Hancke <philipp.hancke@googlemail.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32119}
diff --git a/pc/peer_connection_rtp_unittest.cc b/pc/peer_connection_rtp_unittest.cc
index 152a12e..44f105b 100644
--- a/pc/peer_connection_rtp_unittest.cc
+++ b/pc/peer_connection_rtp_unittest.cc
@@ -1540,6 +1540,21 @@
.type());
}
+// Test that you can do createOffer/setLocalDescription with a stopped
+// media section.
+TEST_F(PeerConnectionRtpTestUnifiedPlan,
+ SetLocalDescriptionWithStoppedMediaSection) {
+ auto caller = CreatePeerConnection();
+ auto callee = CreatePeerConnection();
+ auto transceiver = caller->AddTransceiver(cricket::MEDIA_TYPE_AUDIO);
+ ASSERT_TRUE(caller->ExchangeOfferAnswerWith(callee.get()));
+ callee->pc()->GetTransceivers()[0]->StopStandard();
+ ASSERT_TRUE(callee->ExchangeOfferAnswerWith(caller.get()));
+ EXPECT_EQ(RtpTransceiverDirection::kStopped,
+ transceiver->current_direction());
+ ASSERT_TRUE(caller->ExchangeOfferAnswerWith(callee.get()));
+}
+
// Test that AddTransceiver fails if trying to use unimplemented RTP encoding
// parameters with the send_encodings parameters.
TEST_F(PeerConnectionRtpTestUnifiedPlan,