Handle the corner cases for BUNDLE.
Reject the local/remote description trying to change the pre-negotiated
BUNDLE tag.
Reject an answer containing a BUNDLE group that's not a subset of the offered group.
Reject an offer/answer with a BUNDLE group containing a MID that no m= section has.
Reject an answer removes an m= section from an established BUNDLE group without
rejecting it.
Bug: chromium:827917
Change-Id: If334eefb00b1c1c1e24f9afba0cb00b5867f5590
Reviewed-on: https://webrtc-review.googlesource.com/67190
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22813}diff --git a/pc/peerconnection_media_unittest.cc b/pc/peerconnection_media_unittest.cc
index 8d1dd76..228243c 100644
--- a/pc/peerconnection_media_unittest.cc
+++ b/pc/peerconnection_media_unittest.cc
@@ -955,6 +955,14 @@
auto* transport = desc->GetTransportInfoByName(old_name);
RTC_DCHECK(transport);
transport->content_name = new_name;
+
+ // Rename the content name in the BUNDLE group.
+ cricket::ContentGroup new_bundle_group =
+ *desc->GetGroupByName(cricket::GROUP_TYPE_BUNDLE);
+ new_bundle_group.RemoveContentName(old_name);
+ new_bundle_group.AddContentName(new_name);
+ desc->RemoveGroupByName(cricket::GROUP_TYPE_BUNDLE);
+ desc->AddGroup(new_bundle_group);
}
// Tests that an answer responds with the same MIDs as the offer.