Test handling of rejected m-lines without transport description

adds a unit test for
  https://webrtc-review.googlesource.com/c/src/+/340322
which is a single m-line variant of the original
fiddle that does not require renegotiation

BUG=chromium:326493639

Change-Id: Icc5ebb1dda6502b00828a77e13b9f5fc865d34c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340500
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41818}
This commit is contained in:
Philipp Hancke 2024-02-23 19:04:55 +01:00 committed by WebRTC LUCI CQ
parent 058bfe3ae3
commit 51532fd355

View File

@ -1215,4 +1215,31 @@ TEST_F(SdpOfferAnswerTest,
cricket::kMsidSignalingNotUsed);
}
TEST_F(SdpOfferAnswerTest, OfferWithRejectedMlineWithoutFingerprintIsAccepted) {
auto pc = CreatePeerConnection();
// A rejected m-line without fingerprint.
// The answer does not require one.
std::string sdp =
"v=0\r\n"
"o=- 0 3 IN IP4 127.0.0.1\r\n"
"s=-\r\n"
"t=0 0\r\n"
"a=setup:actpass\r\n"
"a=ice-ufrag:ETEn\r\n"
"a=ice-pwd:OtSK0WpNtpUjkY4+86js7Z/l\r\n"
"m=audio 0 RTP/SAVPF 111\r\n"
"c=IN IP4 0.0.0.0\r\n"
"a=sendrecv\r\n"
"a=rtpmap:111 opus/48000/2\r\n"
"a=rtcp-mux\r\n";
auto desc = CreateSessionDescription(SdpType::kOffer, sdp);
ASSERT_NE(desc, nullptr);
RTCError error;
pc->SetRemoteDescription(std::move(desc), &error);
EXPECT_TRUE(error.ok());
auto answer = pc->CreateAnswer();
EXPECT_TRUE(pc->SetLocalDescription(std::move(answer)));
}
} // namespace webrtc