mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-17 23:57:59 +01:00
Remove another DCHECK that fails during renegotiation.
Also adds a test case that catches both this DCHECK and the previous one. Bug: webrtc:9719 Change-Id: I590544a13cd178274e9c11b698c4694fd5cf0d59 No-Try: True Tbr: steveanton@webrtc.org Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140802 Reviewed-by: Bjorn Mellem <mellem@webrtc.org> Commit-Queue: Bjorn Mellem <mellem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28185}
This commit is contained in:
parent
99daff46ed
commit
907b592091
2 changed files with 45 additions and 2 deletions
|
@ -73,8 +73,6 @@ void CompositeRtpTransport::RemoveTransport(RtpTransportInternal* transport) {
|
|||
|
||||
auto it = absl::c_find(transports_, transport);
|
||||
if (it == transports_.end()) {
|
||||
RTC_NOTREACHED() << "Callers should not remove transports they did not "
|
||||
"include in the composite";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -2415,6 +2415,51 @@ TEST_P(JsepTransportControllerDatagramTest, RenegotiationCannotRemoveDatagram) {
|
|||
fake_params);
|
||||
}
|
||||
|
||||
TEST_P(JsepTransportControllerDatagramTest,
|
||||
RenegotiationKeepsDatagramTransport) {
|
||||
cricket::OpaqueTransportParameters fake_params = CreateTransportParameters();
|
||||
if (IsOfferer()) {
|
||||
EXPECT_EQ(transport_controller_->GetTransportParameters(kAudioMid1),
|
||||
fake_params);
|
||||
EXPECT_EQ(transport_controller_->GetTransportParameters(kVideoMid1),
|
||||
fake_params);
|
||||
}
|
||||
|
||||
auto offer = CreateSessionDescriptionForDatagramTransport(fake_params);
|
||||
EXPECT_TRUE(SetDescription(SdpType::kOffer, offer.get()).ok());
|
||||
|
||||
EXPECT_EQ(transport_controller_->GetTransportParameters(kAudioMid1),
|
||||
fake_params);
|
||||
EXPECT_EQ(transport_controller_->GetTransportParameters(kVideoMid1),
|
||||
fake_params);
|
||||
|
||||
auto answer = CreateSessionDescriptionForDatagramTransport(fake_params);
|
||||
EXPECT_TRUE(SetDescription(SdpType::kAnswer, answer.get()).ok());
|
||||
|
||||
EXPECT_EQ(transport_controller_->GetTransportParameters(kAudioMid1),
|
||||
fake_params);
|
||||
EXPECT_EQ(transport_controller_->GetTransportParameters(kVideoMid1),
|
||||
fake_params);
|
||||
|
||||
// Attempting to remove a datagram transport on a re-offer does not cause an
|
||||
// error, but also does not remove the datagram transport.
|
||||
auto reoffer = CreateSessionDescriptionForDatagramTransport(fake_params);
|
||||
EXPECT_TRUE(SetDescription(SdpType::kOffer, reoffer.get()).ok());
|
||||
|
||||
EXPECT_EQ(transport_controller_->GetTransportParameters(kAudioMid1),
|
||||
fake_params);
|
||||
EXPECT_EQ(transport_controller_->GetTransportParameters(kVideoMid1),
|
||||
fake_params);
|
||||
|
||||
auto reanswer = CreateSessionDescriptionForDatagramTransport(fake_params);
|
||||
EXPECT_TRUE(SetDescription(SdpType::kAnswer, reanswer.get()).ok());
|
||||
|
||||
EXPECT_EQ(transport_controller_->GetTransportParameters(kAudioMid1),
|
||||
fake_params);
|
||||
EXPECT_EQ(transport_controller_->GetTransportParameters(kVideoMid1),
|
||||
fake_params);
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
JsepTransportControllerDatagramTests,
|
||||
JsepTransportControllerDatagramTest,
|
||||
|
|
Loading…
Reference in a new issue