Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Unified Diff: pc/webrtcsdp_unittest.cc

Issue 3012383002: Serialize "a=x-google-flag:conference". (Closed)
Patch Set: Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pc/webrtcsdp.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pc/webrtcsdp_unittest.cc
diff --git a/pc/webrtcsdp_unittest.cc b/pc/webrtcsdp_unittest.cc
index eea8e01aac9aeeff3ec95744945719b52203c9e4..75dac2505b2a4c7a346e9480d551360ab717b0f2 100644
--- a/pc/webrtcsdp_unittest.cc
+++ b/pc/webrtcsdp_unittest.cc
@@ -2777,6 +2777,27 @@ TEST_F(WebRtcSdpTest, DeserializeSdpWithConferenceFlag) {
EXPECT_TRUE(video->conference_mode());
}
+TEST_F(WebRtcSdpTest, SerializeSdpWithConferenceFlag) {
+ JsepSessionDescription jdesc(kDummyString);
+
+ // We tested deserialization already above, so just test that if we serialize
+ // and deserialize the flag doesn't disappear.
+ EXPECT_TRUE(SdpDeserialize(kSdpConferenceString, &jdesc));
+ std::string reserialized = webrtc::SdpSerialize(jdesc, false);
+ EXPECT_TRUE(SdpDeserialize(reserialized, &jdesc));
+
+ // Verify.
+ cricket::AudioContentDescription* audio =
+ static_cast<AudioContentDescription*>(
+ jdesc.description()->GetContentDescriptionByName(cricket::CN_AUDIO));
+ EXPECT_TRUE(audio->conference_mode());
+
+ cricket::VideoContentDescription* video =
+ static_cast<VideoContentDescription*>(
+ jdesc.description()->GetContentDescriptionByName(cricket::CN_VIDEO));
+ EXPECT_TRUE(video->conference_mode());
+}
+
TEST_F(WebRtcSdpTest, DeserializeBrokenSdp) {
const char kSdpDestroyer[] = "!@#$%^&";
const char kSdpEmptyType[] = " =candidate";
« no previous file with comments | « pc/webrtcsdp.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698