Make sure b lines appear before all the a lines. Per RFC 4566, the order of media description should be:
m= (media name and transport address)
i=* (media title)
c=* (connection information -- optional if included at
session level)
b=* (zero or more bandwidth information lines)
k=* (encryption key)
a=* (zero or more media attribute lines)
BUG=2260
R=jiayl@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/15889004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6708 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/app/webrtc/webrtcsdp_unittest.cc b/talk/app/webrtc/webrtcsdp_unittest.cc
index e28599f..2d275a1 100644
--- a/talk/app/webrtc/webrtcsdp_unittest.cc
+++ b/talk/app/webrtc/webrtcsdp_unittest.cc
@@ -1408,10 +1408,10 @@
jdesc_.session_version()));
std::string message = webrtc::SdpSerialize(jdesc_);
std::string sdp_with_bandwidth = kSdpFullString;
- InjectAfter("a=mid:video_content_name\r\na=sendrecv\r\n",
+ InjectAfter("c=IN IP4 74.125.224.39\r\n",
"b=AS:100\r\n",
&sdp_with_bandwidth);
- InjectAfter("a=mid:audio_content_name\r\na=sendrecv\r\n",
+ InjectAfter("c=IN IP4 74.125.127.126\r\n",
"b=AS:50\r\n",
&sdp_with_bandwidth);
EXPECT_EQ(sdp_with_bandwidth, message);
@@ -1535,7 +1535,7 @@
// TODO(pthatcher): We need to temporarily allow the SDP to control
// this for backwards-compatibility. Once we don't need that any
// more, remove this.
- InjectAfter("a=mid:data_content_name\r\na=sendrecv\r\n",
+ InjectAfter("m=application 1 RTP/SAVPF 101\r\nc=IN IP4 0.0.0.0\r\n",
"b=AS:100\r\n",
&expected_sdp);
EXPECT_EQ(expected_sdp, message);