From 4e323cc9138a14e95048d07822e613b0c93aaccd Mon Sep 17 00:00:00 2001 From: Nico Grunbaum Date: Tue, 20 Feb 2018 17:00:27 -0800 Subject: [PATCH] Bug 1439076 - P2 - csrc-audio-level jsep gtest fixes r=jib MozReview-Commit-ID: 1ZHK4TFIc9E --HG-- extra : rebase_source : 897ceea8637b15b9a3872c86a2c8b3ac551e096d --- .../signaling/gtest/jsep_session_unittest.cpp | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/media/webrtc/signaling/gtest/jsep_session_unittest.cpp b/media/webrtc/signaling/gtest/jsep_session_unittest.cpp index 3a4cd530bd1e..da793164a0b1 100644 --- a/media/webrtc/signaling/gtest/jsep_session_unittest.cpp +++ b/media/webrtc/signaling/gtest/jsep_session_unittest.cpp @@ -4296,17 +4296,20 @@ TEST_F(JsepSessionTest, TestExtmap) auto& offerMediaAttrs = parsedOffer->GetMediaSection(0).GetAttributeList(); ASSERT_TRUE(offerMediaAttrs.HasAttribute(SdpAttribute::kExtmapAttribute)); auto& offerExtmap = offerMediaAttrs.GetExtmap().mExtmaps; - ASSERT_EQ(4U, offerExtmap.size()); + ASSERT_EQ(5U, offerExtmap.size()); ASSERT_EQ("urn:ietf:params:rtp-hdrext:ssrc-audio-level", offerExtmap[0].extensionname); ASSERT_EQ(1U, offerExtmap[0].entry); - ASSERT_EQ("urn:ietf:params:rtp-hdrext:sdes:mid", + ASSERT_EQ("urn:ietf:params:rtp-hdrext:csrc-audio-level", offerExtmap[1].extensionname); ASSERT_EQ(2U, offerExtmap[1].entry); - ASSERT_EQ("foo", offerExtmap[2].extensionname); + ASSERT_EQ("urn:ietf:params:rtp-hdrext:sdes:mid", + offerExtmap[2].extensionname); ASSERT_EQ(3U, offerExtmap[2].entry); - ASSERT_EQ("bar", offerExtmap[3].extensionname); + ASSERT_EQ("foo", offerExtmap[3].extensionname); ASSERT_EQ(4U, offerExtmap[3].entry); + ASSERT_EQ("bar", offerExtmap[4].extensionname); + ASSERT_EQ(5U, offerExtmap[4].entry); UniquePtr parsedAnswer(Parse(answer)); ASSERT_EQ(1U, parsedAnswer->GetMediaSectionCount()); @@ -4323,7 +4326,7 @@ TEST_F(JsepSessionTest, TestExtmap) ASSERT_EQ(2U, offerExtmap[1].entry); // We ensure that the entry for "bar" matches what was in the offer ASSERT_EQ("bar", answerExtmap[2].extensionname); - ASSERT_EQ(4U, answerExtmap[2].entry); + ASSERT_EQ(5U, answerExtmap[2].entry); } TEST_F(JsepSessionTest, TestExtmapWithDuplicates) @@ -4345,19 +4348,22 @@ TEST_F(JsepSessionTest, TestExtmapWithDuplicates) auto& offerMediaAttrs = parsedOffer->GetMediaSection(0).GetAttributeList(); ASSERT_TRUE(offerMediaAttrs.HasAttribute(SdpAttribute::kExtmapAttribute)); auto& offerExtmap = offerMediaAttrs.GetExtmap().mExtmaps; - ASSERT_EQ(5U, offerExtmap.size()); + ASSERT_EQ(6U, offerExtmap.size()); ASSERT_EQ("urn:ietf:params:rtp-hdrext:ssrc-audio-level", offerExtmap[0].extensionname); ASSERT_EQ(1U, offerExtmap[0].entry); - ASSERT_EQ("urn:ietf:params:rtp-hdrext:sdes:mid", + ASSERT_EQ("urn:ietf:params:rtp-hdrext:csrc-audio-level", offerExtmap[1].extensionname); ASSERT_EQ(2U, offerExtmap[1].entry); - ASSERT_EQ("foo", offerExtmap[2].extensionname); + ASSERT_EQ("urn:ietf:params:rtp-hdrext:sdes:mid", + offerExtmap[2].extensionname); ASSERT_EQ(3U, offerExtmap[2].entry); - ASSERT_EQ("bar", offerExtmap[3].extensionname); + ASSERT_EQ("foo", offerExtmap[3].extensionname); ASSERT_EQ(4U, offerExtmap[3].entry); - ASSERT_EQ("baz", offerExtmap[4].extensionname); + ASSERT_EQ("bar", offerExtmap[4].extensionname); ASSERT_EQ(5U, offerExtmap[4].entry); + ASSERT_EQ("baz", offerExtmap[5].extensionname); + ASSERT_EQ(6U, offerExtmap[5].entry); }