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}
This commit is contained in:
Harald Alvestrand 2020-09-16 12:41:23 +00:00 committed by Commit Bot
parent c8b3183711
commit 198cd73011

View File

@ -1540,6 +1540,21 @@ TEST_F(PeerConnectionRtpTestUnifiedPlan,
.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,