Reformat the WebRTC code base
Running clang-format with chromium's style guide.
The goal is n-fold:
* providing consistency and readability (that's what code guidelines are for)
* preventing noise with presubmit checks and git cl format
* building on the previous point: making it easier to automatically fix format issues
* you name it
Please consider using git-hyper-blame to ignore this commit.
Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
diff --git a/pc/mediasession_unittest.cc b/pc/mediasession_unittest.cc
index acc1850..269ad78 100644
--- a/pc/mediasession_unittest.cc
+++ b/pc/mediasession_unittest.cc
@@ -26,9 +26,9 @@
#include "rtc_base/messagedigest.h"
#include "rtc_base/ssladapter.h"
-#define ASSERT_CRYPTO(cd, s, cs) \
- ASSERT_EQ(s, cd->cryptos().size()); \
- ASSERT_EQ(std::string(cs), cd->cryptos()[0].cipher_suite)
+#define ASSERT_CRYPTO(cd, s, cs) \
+ ASSERT_EQ(s, cd->cryptos().size()); \
+ ASSERT_EQ(std::string(cs), cd->cryptos()[0].cipher_suite)
typedef std::vector<cricket::Candidate> Candidates;
@@ -423,18 +423,14 @@
std::unique_ptr<SessionDescription> desc;
if (has_current_desc) {
current_desc.reset(new SessionDescription());
- EXPECT_TRUE(current_desc->AddTransportInfo(
- TransportInfo("audio",
- TransportDescription(current_audio_ufrag,
- current_audio_pwd))));
- EXPECT_TRUE(current_desc->AddTransportInfo(
- TransportInfo("video",
- TransportDescription(current_video_ufrag,
- current_video_pwd))));
- EXPECT_TRUE(current_desc->AddTransportInfo(
- TransportInfo("data",
- TransportDescription(current_data_ufrag,
- current_data_pwd))));
+ EXPECT_TRUE(current_desc->AddTransportInfo(TransportInfo(
+ "audio",
+ TransportDescription(current_audio_ufrag, current_audio_pwd))));
+ EXPECT_TRUE(current_desc->AddTransportInfo(TransportInfo(
+ "video",
+ TransportDescription(current_video_ufrag, current_video_pwd))));
+ EXPECT_TRUE(current_desc->AddTransportInfo(TransportInfo(
+ "data", TransportDescription(current_data_ufrag, current_data_pwd))));
}
if (offer) {
desc.reset(f1_.CreateOffer(options, current_desc.get()));
@@ -471,8 +467,7 @@
if (options.bundle_enabled) {
EXPECT_EQ(ti_audio->description.ice_ufrag,
ti_video->description.ice_ufrag);
- EXPECT_EQ(ti_audio->description.ice_pwd,
- ti_video->description.ice_pwd);
+ EXPECT_EQ(ti_audio->description.ice_pwd, ti_video->description.ice_pwd);
} else {
if (has_current_desc) {
EXPECT_EQ(current_video_ufrag, ti_video->description.ice_ufrag);
@@ -498,8 +493,7 @@
if (options.bundle_enabled) {
EXPECT_EQ(ti_audio->description.ice_ufrag,
ti_data->description.ice_ufrag);
- EXPECT_EQ(ti_audio->description.ice_pwd,
- ti_data->description.ice_pwd);
+ EXPECT_EQ(ti_audio->description.ice_pwd, ti_data->description.ice_pwd);
} else {
if (has_current_desc) {
EXPECT_EQ(current_data_ufrag, ti_data->description.ice_ufrag);
@@ -560,7 +554,7 @@
bool found = false;
for (size_t i = 0; i < ref_audio_media_desc->cryptos().size(); ++i) {
if (ref_audio_media_desc->cryptos()[i].Matches(
- audio_media_desc->cryptos()[0])) {
+ audio_media_desc->cryptos()[0])) {
found = true;
break;
}
@@ -647,8 +641,8 @@
}
EXPECT_EQ(MEDIA_TYPE_VIDEO, vcd->type());
EXPECT_EQ(MAKE_VECTOR(kVideoCodecsAnswer), vcd->codecs());
- EXPECT_EQ(0U, vcd->first_ssrc()); // no sender is attached
- EXPECT_TRUE(vcd->rtcp_mux()); // negotiated rtcp-mux
+ EXPECT_EQ(0U, vcd->first_ssrc()); // no sender is attached
+ EXPECT_TRUE(vcd->rtcp_mux()); // negotiated rtcp-mux
if (gcm_offer && gcm_answer) {
ASSERT_CRYPTO(vcd, 1U, kDefaultSrtpCryptoSuiteGcm);
} else {
@@ -818,8 +812,8 @@
EXPECT_EQ(f1_.data_codecs(), dcd->codecs());
EXPECT_EQ(0U, dcd->first_ssrc()); // no sender is attached.
EXPECT_EQ(cricket::kDataMaxBandwidth,
- dcd->bandwidth()); // default bandwidth (auto)
- EXPECT_TRUE(dcd->rtcp_mux()); // rtcp-mux defaults on
+ dcd->bandwidth()); // default bandwidth (auto)
+ EXPECT_TRUE(dcd->rtcp_mux()); // rtcp-mux defaults on
ASSERT_CRYPTO(dcd, 1U, kDefaultSrtpCryptoSuite);
EXPECT_EQ(std::string(cricket::kMediaProtocolSavpf), dcd->protocol());
}
@@ -872,8 +866,8 @@
const AudioContentDescription* acd = ac->media_description()->as_audio();
const VideoContentDescription* vcd = vc->media_description()->as_video();
- EXPECT_FALSE(vcd->has_ssrcs()); // No StreamParams.
- EXPECT_FALSE(acd->has_ssrcs()); // No StreamParams.
+ EXPECT_FALSE(vcd->has_ssrcs()); // No StreamParams.
+ EXPECT_FALSE(acd->has_ssrcs()); // No StreamParams.
}
// Creates an audio+video sendonly offer.
@@ -1004,8 +998,8 @@
ASSERT_CRYPTO(acd, 1U, kDefaultSrtpCryptoSuite);
EXPECT_EQ(MEDIA_TYPE_VIDEO, vcd->type());
EXPECT_EQ(MAKE_VECTOR(kVideoCodecsAnswer), vcd->codecs());
- EXPECT_EQ(0U, vcd->first_ssrc()); // no sender is attached
- EXPECT_TRUE(vcd->rtcp_mux()); // negotiated rtcp-mux
+ EXPECT_EQ(0U, vcd->first_ssrc()); // no sender is attached
+ EXPECT_TRUE(vcd->rtcp_mux()); // negotiated rtcp-mux
ASSERT_CRYPTO(vcd, 1U, kDefaultSrtpCryptoSuite);
EXPECT_EQ(std::string(cricket::kMediaProtocolSavpf), vcd->protocol());
}
@@ -1299,124 +1293,112 @@
std::unique_ptr<SessionDescription> answer(
f2_.CreateAnswer(offer.get(), opts, NULL));
- EXPECT_EQ(MAKE_VECTOR(kAudioRtpExtension1),
- GetFirstAudioContentDescription(
- offer.get())->rtp_header_extensions());
- EXPECT_EQ(MAKE_VECTOR(kVideoRtpExtension1),
- GetFirstVideoContentDescription(
- offer.get())->rtp_header_extensions());
- EXPECT_EQ(MAKE_VECTOR(kAudioRtpExtensionAnswer),
- GetFirstAudioContentDescription(
- answer.get())->rtp_header_extensions());
- EXPECT_EQ(MAKE_VECTOR(kVideoRtpExtensionAnswer),
- GetFirstVideoContentDescription(
- answer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kAudioRtpExtension1),
+ GetFirstAudioContentDescription(offer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kVideoRtpExtension1),
+ GetFirstVideoContentDescription(offer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kAudioRtpExtensionAnswer),
+ GetFirstAudioContentDescription(answer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kVideoRtpExtensionAnswer),
+ GetFirstVideoContentDescription(answer.get())->rtp_header_extensions());
}
TEST_F(MediaSessionDescriptionFactoryTest,
- TestOfferAnswerWithEncryptedRtpExtensionsBoth) {
+ TestOfferAnswerWithEncryptedRtpExtensionsBoth) {
MediaSessionOptions opts;
AddAudioVideoSections(RtpTransceiverDirection::kRecvOnly, &opts);
f1_.set_enable_encrypted_rtp_header_extensions(true);
f2_.set_enable_encrypted_rtp_header_extensions(true);
- f1_.set_audio_rtp_header_extensions(
- MAKE_VECTOR(kAudioRtpExtension1));
- f1_.set_video_rtp_header_extensions(
- MAKE_VECTOR(kVideoRtpExtension1));
- f2_.set_audio_rtp_header_extensions(
- MAKE_VECTOR(kAudioRtpExtension2));
- f2_.set_video_rtp_header_extensions(
- MAKE_VECTOR(kVideoRtpExtension2));
+ f1_.set_audio_rtp_header_extensions(MAKE_VECTOR(kAudioRtpExtension1));
+ f1_.set_video_rtp_header_extensions(MAKE_VECTOR(kVideoRtpExtension1));
+ f2_.set_audio_rtp_header_extensions(MAKE_VECTOR(kAudioRtpExtension2));
+ f2_.set_video_rtp_header_extensions(MAKE_VECTOR(kVideoRtpExtension2));
std::unique_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
ASSERT_TRUE(offer.get() != NULL);
std::unique_ptr<SessionDescription> answer(
f2_.CreateAnswer(offer.get(), opts, NULL));
- EXPECT_EQ(MAKE_VECTOR(kAudioRtpExtensionEncrypted1),
- GetFirstAudioContentDescription(
- offer.get())->rtp_header_extensions());
- EXPECT_EQ(MAKE_VECTOR(kVideoRtpExtensionEncrypted1),
- GetFirstVideoContentDescription(
- offer.get())->rtp_header_extensions());
- EXPECT_EQ(MAKE_VECTOR(kAudioRtpExtensionEncryptedAnswer),
- GetFirstAudioContentDescription(
- answer.get())->rtp_header_extensions());
- EXPECT_EQ(MAKE_VECTOR(kVideoRtpExtensionEncryptedAnswer),
- GetFirstVideoContentDescription(
- answer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kAudioRtpExtensionEncrypted1),
+ GetFirstAudioContentDescription(offer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kVideoRtpExtensionEncrypted1),
+ GetFirstVideoContentDescription(offer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kAudioRtpExtensionEncryptedAnswer),
+ GetFirstAudioContentDescription(answer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kVideoRtpExtensionEncryptedAnswer),
+ GetFirstVideoContentDescription(answer.get())->rtp_header_extensions());
}
TEST_F(MediaSessionDescriptionFactoryTest,
- TestOfferAnswerWithEncryptedRtpExtensionsOffer) {
+ TestOfferAnswerWithEncryptedRtpExtensionsOffer) {
MediaSessionOptions opts;
AddAudioVideoSections(RtpTransceiverDirection::kRecvOnly, &opts);
f1_.set_enable_encrypted_rtp_header_extensions(true);
- f1_.set_audio_rtp_header_extensions(
- MAKE_VECTOR(kAudioRtpExtension1));
- f1_.set_video_rtp_header_extensions(
- MAKE_VECTOR(kVideoRtpExtension1));
- f2_.set_audio_rtp_header_extensions(
- MAKE_VECTOR(kAudioRtpExtension2));
- f2_.set_video_rtp_header_extensions(
- MAKE_VECTOR(kVideoRtpExtension2));
+ f1_.set_audio_rtp_header_extensions(MAKE_VECTOR(kAudioRtpExtension1));
+ f1_.set_video_rtp_header_extensions(MAKE_VECTOR(kVideoRtpExtension1));
+ f2_.set_audio_rtp_header_extensions(MAKE_VECTOR(kAudioRtpExtension2));
+ f2_.set_video_rtp_header_extensions(MAKE_VECTOR(kVideoRtpExtension2));
std::unique_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
ASSERT_TRUE(offer.get() != NULL);
std::unique_ptr<SessionDescription> answer(
f2_.CreateAnswer(offer.get(), opts, NULL));
- EXPECT_EQ(MAKE_VECTOR(kAudioRtpExtensionEncrypted1),
- GetFirstAudioContentDescription(
- offer.get())->rtp_header_extensions());
- EXPECT_EQ(MAKE_VECTOR(kVideoRtpExtensionEncrypted1),
- GetFirstVideoContentDescription(
- offer.get())->rtp_header_extensions());
- EXPECT_EQ(MAKE_VECTOR(kAudioRtpExtensionAnswer),
- GetFirstAudioContentDescription(
- answer.get())->rtp_header_extensions());
- EXPECT_EQ(MAKE_VECTOR(kVideoRtpExtensionAnswer),
- GetFirstVideoContentDescription(
- answer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kAudioRtpExtensionEncrypted1),
+ GetFirstAudioContentDescription(offer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kVideoRtpExtensionEncrypted1),
+ GetFirstVideoContentDescription(offer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kAudioRtpExtensionAnswer),
+ GetFirstAudioContentDescription(answer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kVideoRtpExtensionAnswer),
+ GetFirstVideoContentDescription(answer.get())->rtp_header_extensions());
}
TEST_F(MediaSessionDescriptionFactoryTest,
- TestOfferAnswerWithEncryptedRtpExtensionsAnswer) {
+ TestOfferAnswerWithEncryptedRtpExtensionsAnswer) {
MediaSessionOptions opts;
AddAudioVideoSections(RtpTransceiverDirection::kRecvOnly, &opts);
f2_.set_enable_encrypted_rtp_header_extensions(true);
- f1_.set_audio_rtp_header_extensions(
- MAKE_VECTOR(kAudioRtpExtension1));
- f1_.set_video_rtp_header_extensions(
- MAKE_VECTOR(kVideoRtpExtension1));
- f2_.set_audio_rtp_header_extensions(
- MAKE_VECTOR(kAudioRtpExtension2));
- f2_.set_video_rtp_header_extensions(
- MAKE_VECTOR(kVideoRtpExtension2));
+ f1_.set_audio_rtp_header_extensions(MAKE_VECTOR(kAudioRtpExtension1));
+ f1_.set_video_rtp_header_extensions(MAKE_VECTOR(kVideoRtpExtension1));
+ f2_.set_audio_rtp_header_extensions(MAKE_VECTOR(kAudioRtpExtension2));
+ f2_.set_video_rtp_header_extensions(MAKE_VECTOR(kVideoRtpExtension2));
std::unique_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
ASSERT_TRUE(offer.get() != NULL);
std::unique_ptr<SessionDescription> answer(
f2_.CreateAnswer(offer.get(), opts, NULL));
- EXPECT_EQ(MAKE_VECTOR(kAudioRtpExtension1),
- GetFirstAudioContentDescription(
- offer.get())->rtp_header_extensions());
- EXPECT_EQ(MAKE_VECTOR(kVideoRtpExtension1),
- GetFirstVideoContentDescription(
- offer.get())->rtp_header_extensions());
- EXPECT_EQ(MAKE_VECTOR(kAudioRtpExtensionAnswer),
- GetFirstAudioContentDescription(
- answer.get())->rtp_header_extensions());
- EXPECT_EQ(MAKE_VECTOR(kVideoRtpExtensionAnswer),
- GetFirstVideoContentDescription(
- answer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kAudioRtpExtension1),
+ GetFirstAudioContentDescription(offer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kVideoRtpExtension1),
+ GetFirstVideoContentDescription(offer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kAudioRtpExtensionAnswer),
+ GetFirstAudioContentDescription(answer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kVideoRtpExtensionAnswer),
+ GetFirstVideoContentDescription(answer.get())->rtp_header_extensions());
}
// Create an audio, video, data answer without legacy StreamParams.
@@ -1638,7 +1620,7 @@
const StreamParamsVec& audio_streams = acd->streams();
ASSERT_EQ(2U, audio_streams.size());
- EXPECT_EQ(audio_streams[0].cname , audio_streams[1].cname);
+ EXPECT_EQ(audio_streams[0].cname, audio_streams[1].cname);
EXPECT_EQ(kAudioTrack1, audio_streams[0].id);
ASSERT_EQ(1U, audio_streams[0].ssrcs.size());
EXPECT_NE(0U, audio_streams[0].ssrcs[0]);
@@ -1667,7 +1649,7 @@
const StreamParamsVec& data_streams = dcd->streams();
ASSERT_EQ(2U, data_streams.size());
- EXPECT_EQ(data_streams[0].cname , data_streams[1].cname);
+ EXPECT_EQ(data_streams[0].cname, data_streams[1].cname);
EXPECT_EQ(kDataTrack1, data_streams[0].id);
ASSERT_EQ(1U, data_streams[0].ssrcs.size());
EXPECT_NE(0U, data_streams[0].ssrcs[0]);
@@ -1676,8 +1658,8 @@
EXPECT_NE(0U, data_streams[1].ssrcs[0]);
EXPECT_EQ(cricket::kDataMaxBandwidth,
- dcd->bandwidth()); // default bandwidth (auto)
- EXPECT_TRUE(dcd->rtcp_mux()); // rtcp-mux defaults on
+ dcd->bandwidth()); // default bandwidth (auto)
+ EXPECT_TRUE(dcd->rtcp_mux()); // rtcp-mux defaults on
ASSERT_CRYPTO(dcd, 1U, kDefaultSrtpCryptoSuite);
// Update the offer. Add a new video track that is not synched to the
@@ -1835,7 +1817,7 @@
const StreamParamsVec& audio_streams = acd->streams();
ASSERT_EQ(2U, audio_streams.size());
- EXPECT_TRUE(audio_streams[0].cname == audio_streams[1].cname);
+ EXPECT_TRUE(audio_streams[0].cname == audio_streams[1].cname);
EXPECT_EQ(kAudioTrack1, audio_streams[0].id);
ASSERT_EQ(1U, audio_streams[0].ssrcs.size());
EXPECT_NE(0U, audio_streams[0].ssrcs[0]);
@@ -1861,7 +1843,7 @@
const StreamParamsVec& data_streams = dcd->streams();
ASSERT_EQ(2U, data_streams.size());
- EXPECT_TRUE(data_streams[0].cname == data_streams[1].cname);
+ EXPECT_TRUE(data_streams[0].cname == data_streams[1].cname);
EXPECT_EQ(kDataTrack1, data_streams[0].id);
ASSERT_EQ(1U, data_streams[0].ssrcs.size());
EXPECT_NE(0U, data_streams[0].ssrcs[0]);
@@ -1870,8 +1852,8 @@
EXPECT_NE(0U, data_streams[1].ssrcs[0]);
EXPECT_EQ(cricket::kDataMaxBandwidth,
- dcd->bandwidth()); // default bandwidth (auto)
- EXPECT_TRUE(dcd->rtcp_mux()); // rtcp-mux defaults on
+ dcd->bandwidth()); // default bandwidth (auto)
+ EXPECT_TRUE(dcd->rtcp_mux()); // rtcp-mux defaults on
// Update the answer. Add a new video track that is not synched to the
// other tracks and remove 1 audio track.
@@ -1912,7 +1894,7 @@
const StreamParamsVec& updated_audio_streams = updated_acd->streams();
ASSERT_EQ(1U, updated_audio_streams.size());
- EXPECT_TRUE(audio_streams[0] == updated_audio_streams[0]);
+ EXPECT_TRUE(audio_streams[0] == updated_audio_streams[0]);
const StreamParamsVec& updated_video_streams = updated_vcd->streams();
ASSERT_EQ(2U, updated_video_streams.size());
@@ -1955,17 +1937,14 @@
// TODO(wu): |updated_offer| should not include the codec
// (i.e. |kAudioCodecs2[0]|) the other side doesn't support.
const AudioCodec kUpdatedAudioCodecOffer[] = {
- kAudioCodecsAnswer[0],
- kAudioCodecsAnswer[1],
- kAudioCodecs2[0],
+ kAudioCodecsAnswer[0], kAudioCodecsAnswer[1], kAudioCodecs2[0],
};
// The expected video codecs are the common video codecs from the first
// offer/answer exchange plus the video codecs only |f2_| offer, sorted in
// preference order.
const VideoCodec kUpdatedVideoCodecOffer[] = {
- kVideoCodecsAnswer[0],
- kVideoCodecs2[1],
+ kVideoCodecsAnswer[0], kVideoCodecs2[1],
};
const AudioContentDescription* updated_acd =
@@ -2128,7 +2107,7 @@
ASSERT_EQ("H264", updated_vcd->codecs()[0].name);
ASSERT_EQ(std::string(cricket::kRtxCodecName), updated_vcd->codecs()[1].name);
- int new_h264_pl_type = updated_vcd->codecs()[0].id;
+ int new_h264_pl_type = updated_vcd->codecs()[0].id;
EXPECT_NE(used_pl_type, new_h264_pl_type);
VideoCodec rtx = updated_vcd->codecs()[1];
int pt_referenced_by_rtx = rtc::FromString<int>(
@@ -2460,12 +2439,12 @@
std::unique_ptr<SessionDescription> answer(
f2_.CreateAnswer(offer.get(), opts, NULL));
- EXPECT_EQ(MAKE_VECTOR(kAudioRtpExtensionAnswer),
- GetFirstAudioContentDescription(
- answer.get())->rtp_header_extensions());
- EXPECT_EQ(MAKE_VECTOR(kVideoRtpExtensionAnswer),
- GetFirstVideoContentDescription(
- answer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kAudioRtpExtensionAnswer),
+ GetFirstAudioContentDescription(answer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kVideoRtpExtensionAnswer),
+ GetFirstVideoContentDescription(answer.get())->rtp_header_extensions());
std::unique_ptr<SessionDescription> updated_offer(
f2_.CreateOffer(opts, answer.get()));
@@ -2516,23 +2495,23 @@
kVideoRtpExtension3[0], kAudioRtpExtension3[1],
};
- EXPECT_EQ(MAKE_VECTOR(kAudioRtpExtension3),
- GetFirstAudioContentDescription(
- offer.get())->rtp_header_extensions());
- EXPECT_EQ(MAKE_VECTOR(kExpectedVideoRtpExtension),
- GetFirstVideoContentDescription(
- offer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kAudioRtpExtension3),
+ GetFirstAudioContentDescription(offer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kExpectedVideoRtpExtension),
+ GetFirstVideoContentDescription(offer.get())->rtp_header_extensions());
// Nothing should change when creating a new offer
std::unique_ptr<SessionDescription> updated_offer(
f1_.CreateOffer(opts, offer.get()));
EXPECT_EQ(MAKE_VECTOR(kAudioRtpExtension3),
- GetFirstAudioContentDescription(
- updated_offer.get())->rtp_header_extensions());
+ GetFirstAudioContentDescription(updated_offer.get())
+ ->rtp_header_extensions());
EXPECT_EQ(MAKE_VECTOR(kExpectedVideoRtpExtension),
- GetFirstVideoContentDescription(
- updated_offer.get())->rtp_header_extensions());
+ GetFirstVideoContentDescription(updated_offer.get())
+ ->rtp_header_extensions());
}
// Same as "RtpExtensionIdReused" above for encrypted RTP extensions.
@@ -2558,23 +2537,23 @@
kAudioRtpExtension3ForEncryptionOffer[2],
};
- EXPECT_EQ(MAKE_VECTOR(kAudioRtpExtension3ForEncryptionOffer),
- GetFirstAudioContentDescription(
- offer.get())->rtp_header_extensions());
- EXPECT_EQ(MAKE_VECTOR(kExpectedVideoRtpExtension),
- GetFirstVideoContentDescription(
- offer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kAudioRtpExtension3ForEncryptionOffer),
+ GetFirstAudioContentDescription(offer.get())->rtp_header_extensions());
+ EXPECT_EQ(
+ MAKE_VECTOR(kExpectedVideoRtpExtension),
+ GetFirstVideoContentDescription(offer.get())->rtp_header_extensions());
// Nothing should change when creating a new offer
std::unique_ptr<SessionDescription> updated_offer(
f1_.CreateOffer(opts, offer.get()));
EXPECT_EQ(MAKE_VECTOR(kAudioRtpExtension3ForEncryptionOffer),
- GetFirstAudioContentDescription(
- updated_offer.get())->rtp_header_extensions());
+ GetFirstAudioContentDescription(updated_offer.get())
+ ->rtp_header_extensions());
EXPECT_EQ(MAKE_VECTOR(kExpectedVideoRtpExtension),
- GetFirstVideoContentDescription(
- updated_offer.get())->rtp_header_extensions());
+ GetFirstVideoContentDescription(updated_offer.get())
+ ->rtp_header_extensions());
}
TEST(MediaSessionDescription, CopySessionDescription) {
@@ -2643,7 +2622,7 @@
}
TEST_F(MediaSessionDescriptionFactoryTest,
- TestTransportInfoOfferMultimediaCurrent) {
+ TestTransportInfoOfferMultimediaCurrent) {
MediaSessionOptions options;
AddAudioVideoSections(RtpTransceiverDirection::kRecvOnly, &options);
AddDataSection(cricket::DCT_RTP, RtpTransceiverDirection::kRecvOnly,
@@ -2704,7 +2683,7 @@
}
TEST_F(MediaSessionDescriptionFactoryTest,
- TestTransportInfoAnswerMultimediaCurrent) {
+ TestTransportInfoAnswerMultimediaCurrent) {
MediaSessionOptions options;
AddAudioVideoSections(RtpTransceiverDirection::kRecvOnly, &options);
AddDataSection(cricket::DCT_RTP, RtpTransceiverDirection::kRecvOnly,
@@ -2722,7 +2701,7 @@
}
TEST_F(MediaSessionDescriptionFactoryTest,
- TestTransportInfoAnswerBundleCurrent) {
+ TestTransportInfoAnswerBundleCurrent) {
MediaSessionOptions options;
AddAudioVideoSections(RtpTransceiverDirection::kRecvOnly, &options);
AddDataSection(cricket::DCT_RTP, RtpTransceiverDirection::kRecvOnly,
@@ -2798,7 +2777,7 @@
const AudioContentDescription* answer_audio_desc =
answer_content->media_description()->as_audio();
EXPECT_EQ(std::string(cricket::kMediaProtocolDtlsSavpf),
- answer_audio_desc->protocol());
+ answer_audio_desc->protocol());
}
// Test that we include both SDES and DTLS in the offer, but only include SDES