Fix SdpSemantics::kPlanB deprecated usage

Anything linking to //third_party/jsoncpp is hiding deprecated usage
warnings, so these were not discovered earlier.

Bug: chromium:983223
Change-Id: Ib527710b2688d691250d2b9f4894a9e6726d148f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258123
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36458}
This commit is contained in:
Florent Castelli 2022-04-06 00:38:21 +02:00 committed by WebRTC LUCI CQ
parent df894ad299
commit 15a38de78d
13 changed files with 62 additions and 60 deletions

View file

@ -87,7 +87,7 @@ class DataChannelIntegrationTestPlanB
: public PeerConnectionIntegrationBaseTest {
protected:
DataChannelIntegrationTestPlanB()
: PeerConnectionIntegrationBaseTest(SdpSemantics::kPlanB) {}
: PeerConnectionIntegrationBaseTest(SdpSemantics::kPlanB_DEPRECATED) {}
};
class DataChannelIntegrationTestUnifiedPlan
@ -910,7 +910,7 @@ TEST_P(DataChannelIntegrationTest,
INSTANTIATE_TEST_SUITE_P(DataChannelIntegrationTest,
DataChannelIntegrationTest,
Values(SdpSemantics::kPlanB,
Values(SdpSemantics::kPlanB_DEPRECATED,
SdpSemantics::kUnifiedPlan));
TEST_F(DataChannelIntegrationTestUnifiedPlan,

View file

@ -488,7 +488,7 @@ TEST_P(PeerConnectionBundleMatrixTest,
INSTANTIATE_TEST_SUITE_P(
PeerConnectionBundleTest,
PeerConnectionBundleMatrixTest,
Combine(Values(SdpSemantics::kPlanB, SdpSemantics::kUnifiedPlan),
Combine(Values(SdpSemantics::kPlanB_DEPRECATED, SdpSemantics::kUnifiedPlan),
Values(std::make_tuple(BundlePolicy::kBundlePolicyBalanced,
BundleIncluded::kBundleInAnswer,
false,
@ -891,7 +891,7 @@ TEST_P(PeerConnectionBundleTest, RemoveContentFromBundleGroup) {
INSTANTIATE_TEST_SUITE_P(PeerConnectionBundleTest,
PeerConnectionBundleTest,
Values(SdpSemantics::kPlanB,
Values(SdpSemantics::kPlanB_DEPRECATED,
SdpSemantics::kUnifiedPlan));
// According to RFC5888, if an endpoint understands the semantics of an

View file

@ -680,7 +680,7 @@ TEST_P(PeerConnectionCryptoDtlsCertGenTest, TestCertificateGeneration) {
INSTANTIATE_TEST_SUITE_P(
PeerConnectionCryptoTest,
PeerConnectionCryptoDtlsCertGenTest,
Combine(Values(SdpSemantics::kPlanB, SdpSemantics::kUnifiedPlan),
Combine(Values(SdpSemantics::kPlanB_DEPRECATED, SdpSemantics::kUnifiedPlan),
Values(SdpType::kOffer, SdpType::kAnswer),
Values(CertGenTime::kBefore, CertGenTime::kDuring),
Values(CertGenResult::kSucceed, CertGenResult::kFail),
@ -785,7 +785,7 @@ TEST_P(PeerConnectionCryptoTest, SessionErrorIfFingerprintInvalid) {
INSTANTIATE_TEST_SUITE_P(PeerConnectionCryptoTest,
PeerConnectionCryptoTest,
Values(SdpSemantics::kPlanB,
Values(SdpSemantics::kPlanB_DEPRECATED,
SdpSemantics::kUnifiedPlan));
} // namespace webrtc

View file

@ -331,7 +331,7 @@ TEST_P(PeerConnectionDataChannelTest, ObsoleteSdpSyntaxIfSet) {
INSTANTIATE_TEST_SUITE_P(PeerConnectionDataChannelTest,
PeerConnectionDataChannelTest,
Values(SdpSemantics::kPlanB,
Values(SdpSemantics::kPlanB_DEPRECATED,
SdpSemantics::kUnifiedPlan));
} // namespace webrtc

View file

@ -784,5 +784,5 @@ TEST_P(PeerConnectionEndToEndTest, CanRestartIce) {
INSTANTIATE_TEST_SUITE_P(PeerConnectionEndToEndTest,
PeerConnectionEndToEndTest,
Values(SdpSemantics::kPlanB,
Values(SdpSemantics::kPlanB_DEPRECATED,
SdpSemantics::kUnifiedPlan));

View file

@ -220,7 +220,7 @@ TEST_P(PeerConnectionHeaderExtensionTest, NegotiatedExtensionsAreAccessible) {
INSTANTIATE_TEST_SUITE_P(
,
PeerConnectionHeaderExtensionTest,
Combine(Values(SdpSemantics::kPlanB, SdpSemantics::kUnifiedPlan),
Combine(Values(SdpSemantics::kPlanB_DEPRECATED, SdpSemantics::kUnifiedPlan),
Values(cricket::MediaType::MEDIA_TYPE_AUDIO,
cricket::MediaType::MEDIA_TYPE_VIDEO)),
[](const testing::TestParamInfo<
@ -229,7 +229,8 @@ INSTANTIATE_TEST_SUITE_P(
SdpSemantics semantics;
std::tie(media_type, semantics) = info.param;
return (rtc::StringBuilder("With")
<< (semantics == SdpSemantics::kPlanB ? "PlanB" : "UnifiedPlan")
<< (semantics == SdpSemantics::kPlanB_DEPRECATED ? "PlanB"
: "UnifiedPlan")
<< "And"
<< (media_type == cricket::MediaType::MEDIA_TYPE_AUDIO ? "Voice"
: "Video")

View file

@ -1202,7 +1202,7 @@ TEST_F(PeerConnectionIceTestUnifiedPlan,
class PeerConnectionIceTestPlanB : public PeerConnectionIceBaseTest {
protected:
PeerConnectionIceTestPlanB()
: PeerConnectionIceBaseTest(SdpSemantics::kPlanB) {}
: PeerConnectionIceBaseTest(SdpSemantics::kPlanB_DEPRECATED) {}
};
TEST_F(PeerConnectionIceTestPlanB,
@ -1301,7 +1301,7 @@ TEST_P(PeerConnectionIceUfragPwdAnswerTest, TestIncludedInAnswer) {
INSTANTIATE_TEST_SUITE_P(
PeerConnectionIceTest,
PeerConnectionIceUfragPwdAnswerTest,
Combine(Values(SdpSemantics::kPlanB, SdpSemantics::kUnifiedPlan),
Combine(Values(SdpSemantics::kPlanB_DEPRECATED, SdpSemantics::kUnifiedPlan),
Values(std::make_pair(true, true), // Both changed.
std::make_pair(true, false), // Only ufrag changed.
std::make_pair(false, true)))); // Only pwd changed.
@ -1398,7 +1398,7 @@ TEST_P(PeerConnectionIceTest,
INSTANTIATE_TEST_SUITE_P(PeerConnectionIceTest,
PeerConnectionIceTest,
Values(SdpSemantics::kPlanB,
Values(SdpSemantics::kPlanB_DEPRECATED,
SdpSemantics::kUnifiedPlan));
class PeerConnectionIceConfigTest : public ::testing::Test {

View file

@ -132,7 +132,7 @@ class PeerConnectionIntegrationTestPlanB
: public PeerConnectionIntegrationBaseTest {
protected:
PeerConnectionIntegrationTestPlanB()
: PeerConnectionIntegrationBaseTest(SdpSemantics::kPlanB) {}
: PeerConnectionIntegrationBaseTest(SdpSemantics::kPlanB_DEPRECATED) {}
};
class PeerConnectionIntegrationTestUnifiedPlan
@ -535,7 +535,7 @@ TEST_P(PeerConnectionIntegrationTest, AudioToVideoUpgrade) {
// send/receive video on the callee side.
caller()->AddAudioVideoTracks();
callee()->AddAudioTrack();
if (sdp_semantics_ == SdpSemantics::kPlanB) {
if (sdp_semantics_ == SdpSemantics::kPlanB_DEPRECATED) {
PeerConnectionInterface::RTCOfferAnswerOptions options;
options.offer_to_receive_video = 0;
callee()->SetOfferAnswerOptions(options);
@ -565,7 +565,7 @@ TEST_P(PeerConnectionIntegrationTest, AudioToVideoUpgrade) {
// Now negotiate with video and ensure negotiation succeeds, with video
// frames and additional audio frames being received.
callee()->AddVideoTrack();
if (sdp_semantics_ == SdpSemantics::kPlanB) {
if (sdp_semantics_ == SdpSemantics::kPlanB_DEPRECATED) {
PeerConnectionInterface::RTCOfferAnswerOptions options;
options.offer_to_receive_video = 1;
callee()->SetOfferAnswerOptions(options);
@ -782,7 +782,7 @@ TEST_P(PeerConnectionIntegrationTest, AnswererRejectsAudioSection) {
ASSERT_TRUE(CreatePeerConnectionWrappers());
ConnectFakeSignaling();
caller()->AddAudioVideoTracks();
if (sdp_semantics_ == SdpSemantics::kPlanB) {
if (sdp_semantics_ == SdpSemantics::kPlanB_DEPRECATED) {
// Only add video track for callee, and set offer_to_receive_audio to 0, so
// it will reject the audio m= section completely.
PeerConnectionInterface::RTCOfferAnswerOptions options;
@ -826,7 +826,7 @@ TEST_P(PeerConnectionIntegrationTest, AnswererRejectsVideoSection) {
ASSERT_TRUE(CreatePeerConnectionWrappers());
ConnectFakeSignaling();
caller()->AddAudioVideoTracks();
if (sdp_semantics_ == SdpSemantics::kPlanB) {
if (sdp_semantics_ == SdpSemantics::kPlanB_DEPRECATED) {
// Only add audio track for callee, and set offer_to_receive_video to 0, so
// it will reject the video m= section completely.
PeerConnectionInterface::RTCOfferAnswerOptions options;
@ -873,7 +873,7 @@ TEST_P(PeerConnectionIntegrationTest, AnswererRejectsAudioAndVideoSections) {
ASSERT_TRUE(CreatePeerConnectionWrappers());
ConnectFakeSignaling();
caller()->AddAudioVideoTracks();
if (sdp_semantics_ == SdpSemantics::kPlanB) {
if (sdp_semantics_ == SdpSemantics::kPlanB_DEPRECATED) {
// Don't give the callee any tracks, and set offer_to_receive_X to 0, so it
// will reject both audio and video m= sections.
PeerConnectionInterface::RTCOfferAnswerOptions options;
@ -921,7 +921,7 @@ TEST_P(PeerConnectionIntegrationTest, VideoRejectedInSubsequentOffer) {
ASSERT_TRUE(ExpectNewFrames(media_expectations));
}
// Renegotiate, rejecting the video m= section.
if (sdp_semantics_ == SdpSemantics::kPlanB) {
if (sdp_semantics_ == SdpSemantics::kPlanB_DEPRECATED) {
caller()->SetGeneratedSdpMunger(
[](cricket::SessionDescription* description) {
for (cricket::ContentInfo& content : description->contents()) {
@ -2194,7 +2194,7 @@ constexpr uint32_t kFlagsIPv4Stun =
INSTANTIATE_TEST_SUITE_P(
PeerConnectionIntegrationTest,
PeerConnectionIntegrationIceStatesTest,
Combine(Values(SdpSemantics::kPlanB, SdpSemantics::kUnifiedPlan),
Combine(Values(SdpSemantics::kPlanB_DEPRECATED, SdpSemantics::kUnifiedPlan),
Values(std::make_pair("IPv4 no STUN", kFlagsIPv4NoStun),
std::make_pair("IPv6 no STUN", kFlagsIPv6NoStun),
std::make_pair("IPv4 with STUN", kFlagsIPv4Stun))));
@ -2202,7 +2202,7 @@ INSTANTIATE_TEST_SUITE_P(
INSTANTIATE_TEST_SUITE_P(
PeerConnectionIntegrationTest,
PeerConnectionIntegrationIceStatesTestWithFakeClock,
Combine(Values(SdpSemantics::kPlanB, SdpSemantics::kUnifiedPlan),
Combine(Values(SdpSemantics::kPlanB_DEPRECATED, SdpSemantics::kUnifiedPlan),
Values(std::make_pair("IPv4 no STUN", kFlagsIPv4NoStun),
std::make_pair("IPv6 no STUN", kFlagsIPv6NoStun),
std::make_pair("IPv4 with STUN", kFlagsIPv4Stun))));
@ -2366,7 +2366,7 @@ TEST_P(PeerConnectionIntegrationTest,
// Negotiate again, disabling the video "m=" section (the callee will set the
// port to 0 due to offer_to_receive_video = 0).
if (sdp_semantics_ == SdpSemantics::kPlanB) {
if (sdp_semantics_ == SdpSemantics::kPlanB_DEPRECATED) {
PeerConnectionInterface::RTCOfferAnswerOptions options;
options.offer_to_receive_video = 0;
callee()->SetOfferAnswerOptions(options);
@ -2387,7 +2387,7 @@ TEST_P(PeerConnectionIntegrationTest,
// Enable video and do negotiation again, making sure video is received
// end-to-end, also adding media stream to callee.
if (sdp_semantics_ == SdpSemantics::kPlanB) {
if (sdp_semantics_ == SdpSemantics::kPlanB_DEPRECATED) {
PeerConnectionInterface::RTCOfferAnswerOptions options;
options.offer_to_receive_video = 1;
callee()->SetOfferAnswerOptions(options);
@ -3523,7 +3523,7 @@ TEST_F(PeerConnectionIntegrationTestUnifiedPlan,
INSTANTIATE_TEST_SUITE_P(
PeerConnectionIntegrationTest,
PeerConnectionIntegrationTest,
Combine(Values(SdpSemantics::kPlanB, SdpSemantics::kUnifiedPlan),
Combine(Values(SdpSemantics::kPlanB_DEPRECATED, SdpSemantics::kUnifiedPlan),
Values("WebRTC-FrameBuffer3/arm:FrameBuffer2/",
"WebRTC-FrameBuffer3/arm:FrameBuffer3/",
"WebRTC-FrameBuffer3/arm:SyncDecoding/")));
@ -3531,7 +3531,7 @@ INSTANTIATE_TEST_SUITE_P(
INSTANTIATE_TEST_SUITE_P(
PeerConnectionIntegrationTest,
PeerConnectionIntegrationTestWithFakeClock,
Combine(Values(SdpSemantics::kPlanB, SdpSemantics::kUnifiedPlan),
Combine(Values(SdpSemantics::kPlanB_DEPRECATED, SdpSemantics::kUnifiedPlan),
Values("WebRTC-FrameBuffer3/arm:FrameBuffer2/",
"WebRTC-FrameBuffer3/arm:FrameBuffer3/",
"WebRTC-FrameBuffer3/arm:SyncDecoding/")));
@ -3547,7 +3547,7 @@ class PeerConnectionIntegrationInteropTest
// because we specify not to use the test semantics when creating
// PeerConnectionIntegrationWrappers.
PeerConnectionIntegrationInteropTest()
: PeerConnectionIntegrationBaseTest(SdpSemantics::kPlanB),
: PeerConnectionIntegrationBaseTest(SdpSemantics::kPlanB_DEPRECATED),
caller_semantics_(std::get<0>(GetParam())),
callee_semantics_(std::get<1>(GetParam())) {}
@ -3669,14 +3669,16 @@ TEST_P(PeerConnectionIntegrationTest, NewTracksDoNotCauseNewCandidates) {
INSTANTIATE_TEST_SUITE_P(
PeerConnectionIntegrationTest,
PeerConnectionIntegrationInteropTest,
Values(std::make_tuple(SdpSemantics::kPlanB, SdpSemantics::kUnifiedPlan),
std::make_tuple(SdpSemantics::kUnifiedPlan, SdpSemantics::kPlanB)));
Values(std::make_tuple(SdpSemantics::kPlanB_DEPRECATED,
SdpSemantics::kUnifiedPlan),
std::make_tuple(SdpSemantics::kUnifiedPlan,
SdpSemantics::kPlanB_DEPRECATED)));
// Test that if the Unified Plan side offers two video tracks then the Plan B
// side will only see the first one and ignore the second.
TEST_F(PeerConnectionIntegrationTestPlanB, TwoVideoUnifiedPlanToNoMediaPlanB) {
ASSERT_TRUE(CreatePeerConnectionWrappersWithSdpSemantics(
SdpSemantics::kUnifiedPlan, SdpSemantics::kPlanB));
SdpSemantics::kUnifiedPlan, SdpSemantics::kPlanB_DEPRECATED));
ConnectFakeSignaling();
auto first_sender = caller()->AddVideoTrack();
caller()->AddVideoTrack();

View file

@ -942,7 +942,7 @@ class PeerConnectionInterfaceBaseTest : public ::testing::Test {
void InitiateCall() {
CreatePeerConnectionWithoutDtls();
// Create a local stream with audio&video tracks.
if (sdp_semantics_ == SdpSemantics::kPlanB) {
if (sdp_semantics_ == SdpSemantics::kPlanB_DEPRECATED) {
AddAudioVideoStream(kStreamId1, "audio_track", "video_track");
} else {
// Unified Plan does not support AddStream, so just add an audio and video
@ -1235,7 +1235,7 @@ class PeerConnectionInterfaceBaseTest : public ::testing::Test {
}
const char* GetSdpStringWithStream1() const {
if (sdp_semantics_ == SdpSemantics::kPlanB) {
if (sdp_semantics_ == SdpSemantics::kPlanB_DEPRECATED) {
return kSdpStringWithStream1PlanB;
} else {
return kSdpStringWithStream1UnifiedPlan;
@ -1243,7 +1243,7 @@ class PeerConnectionInterfaceBaseTest : public ::testing::Test {
}
const char* GetSdpStringWithStream1And2() const {
if (sdp_semantics_ == SdpSemantics::kPlanB) {
if (sdp_semantics_ == SdpSemantics::kPlanB_DEPRECATED) {
return kSdpStringWithStream1And2PlanB;
} else {
return kSdpStringWithStream1And2UnifiedPlan;
@ -1274,7 +1274,7 @@ class PeerConnectionInterfaceTestPlanB
: public PeerConnectionInterfaceBaseTest {
protected:
PeerConnectionInterfaceTestPlanB()
: PeerConnectionInterfaceBaseTest(SdpSemantics::kPlanB) {}
: PeerConnectionInterfaceBaseTest(SdpSemantics::kPlanB_DEPRECATED) {}
};
// Generate different CNAMEs when PeerConnections are created.
@ -1588,7 +1588,7 @@ TEST_P(PeerConnectionInterfaceTest, AddTrackWithoutStream) {
EXPECT_EQ(audio_track, audio_sender->track());
EXPECT_EQ("video_track", video_sender->id());
EXPECT_EQ(video_track, video_sender->track());
if (sdp_semantics_ == SdpSemantics::kPlanB) {
if (sdp_semantics_ == SdpSemantics::kPlanB_DEPRECATED) {
// If the ID is truly a random GUID, it should be infinitely unlikely they
// will be the same.
EXPECT_NE(video_sender->stream_ids(), audio_sender->stream_ids());
@ -2007,7 +2007,6 @@ TEST_P(PeerConnectionInterfaceTest, SctpDuplicatedLabelAllowed) {
EXPECT_NE(dup_channel, nullptr);
}
#ifdef WEBRTC_HAVE_SCTP
// This tests that SCTP data channels can be rejected in an answer.
TEST_P(PeerConnectionInterfaceTest, TestRejectSctpDataChannelInAnswer)
@ -2097,15 +2096,15 @@ TEST_P(PeerConnectionInterfaceTest, ReceiveUpdatedAudioOfferWithBadCodecs) {
AddAudioTrack("audio_label");
CreateOfferAsLocalDescription();
const char* answer_sdp =
(sdp_semantics_ == SdpSemantics::kPlanB ? webrtc::kAudioSdpPlanB
: webrtc::kAudioSdpUnifiedPlan);
const char* answer_sdp = (sdp_semantics_ == SdpSemantics::kPlanB_DEPRECATED
? webrtc::kAudioSdpPlanB
: webrtc::kAudioSdpUnifiedPlan);
std::unique_ptr<SessionDescriptionInterface> answer(
webrtc::CreateSessionDescription(SdpType::kAnswer, answer_sdp, nullptr));
EXPECT_TRUE(DoSetSessionDescription(std::move(answer), false));
const char* reoffer_sdp =
(sdp_semantics_ == SdpSemantics::kPlanB
(sdp_semantics_ == SdpSemantics::kPlanB_DEPRECATED
? webrtc::kAudioSdpWithUnsupportedCodecsPlanB
: webrtc::kAudioSdpWithUnsupportedCodecsUnifiedPlan);
std::unique_ptr<SessionDescriptionInterface> updated_offer(
@ -2400,7 +2399,7 @@ TEST_P(PeerConnectionInterfaceTest, CloseAndTestStreamsAndStates) {
// With Plan B, verify the stream count. The analog with Unified Plan is the
// RtpTransceiver count.
if (sdp_semantics_ == SdpSemantics::kPlanB) {
if (sdp_semantics_ == SdpSemantics::kPlanB_DEPRECATED) {
ASSERT_EQ(1u, pc_->local_streams()->count());
ASSERT_EQ(1u, pc_->remote_streams()->count());
} else {
@ -2415,7 +2414,7 @@ TEST_P(PeerConnectionInterfaceTest, CloseAndTestStreamsAndStates) {
EXPECT_EQ(PeerConnectionInterface::kIceGatheringComplete,
pc_->ice_gathering_state());
if (sdp_semantics_ == SdpSemantics::kPlanB) {
if (sdp_semantics_ == SdpSemantics::kPlanB_DEPRECATED) {
EXPECT_EQ(1u, pc_->local_streams()->count());
EXPECT_EQ(1u, pc_->remote_streams()->count());
} else {
@ -2425,7 +2424,7 @@ TEST_P(PeerConnectionInterfaceTest, CloseAndTestStreamsAndStates) {
auto audio_receiver = GetFirstReceiverOfType(cricket::MEDIA_TYPE_AUDIO);
auto video_receiver = GetFirstReceiverOfType(cricket::MEDIA_TYPE_VIDEO);
if (sdp_semantics_ == SdpSemantics::kPlanB) {
if (sdp_semantics_ == SdpSemantics::kPlanB_DEPRECATED) {
ASSERT_TRUE(audio_receiver);
ASSERT_TRUE(video_receiver);
// Track state may be updated asynchronously.
@ -3651,7 +3650,7 @@ TEST_P(PeerConnectionInterfaceTest, ExtmapAllowMixedIsConfigurable) {
INSTANTIATE_TEST_SUITE_P(PeerConnectionInterfaceTest,
PeerConnectionInterfaceTest,
Values(SdpSemantics::kPlanB,
Values(SdpSemantics::kPlanB_DEPRECATED,
SdpSemantics::kUnifiedPlan));
class PeerConnectionMediaConfigTest : public ::testing::Test {

View file

@ -1640,7 +1640,7 @@ TEST_F(PeerConnectionJsepTest, AnswerBeforeOfferFails) {
// two video tracks.
TEST_F(PeerConnectionJsepTest, TwoVideoPlanBToUnifiedPlanFails) {
RTCConfiguration config_planb;
config_planb.sdp_semantics = SdpSemantics::kPlanB;
config_planb.sdp_semantics = SdpSemantics::kPlanB_DEPRECATED;
auto caller = CreatePeerConnection(config_planb);
auto callee = CreatePeerConnection();
caller->AddVideoTrack("video1");
@ -1656,7 +1656,7 @@ TEST_F(PeerConnectionJsepTest, TwoVideoPlanBToUnifiedPlanFails) {
TEST_F(PeerConnectionJsepTest, OneVideoUnifiedPlanToTwoVideoPlanBFails) {
auto caller = CreatePeerConnection();
RTCConfiguration config_planb;
config_planb.sdp_semantics = SdpSemantics::kPlanB;
config_planb.sdp_semantics = SdpSemantics::kPlanB_DEPRECATED;
auto callee = CreatePeerConnection(config_planb);
caller->AddVideoTrack("video");
callee->AddVideoTrack("video1");
@ -1809,7 +1809,7 @@ TEST_F(PeerConnectionJsepTest, RollbackSupportedInUnifiedPlan) {
TEST_F(PeerConnectionJsepTest, RollbackNotSupportedInPlanB) {
RTCConfiguration config;
config.sdp_semantics = SdpSemantics::kPlanB;
config.sdp_semantics = SdpSemantics::kPlanB_DEPRECATED;
config.enable_implicit_rollback = true;
auto caller = CreatePeerConnection(config);
auto callee = CreatePeerConnection(config);

View file

@ -226,7 +226,7 @@ class PeerConnectionMediaTestUnifiedPlan : public PeerConnectionMediaBaseTest {
class PeerConnectionMediaTestPlanB : public PeerConnectionMediaBaseTest {
protected:
PeerConnectionMediaTestPlanB()
: PeerConnectionMediaBaseTest(SdpSemantics::kPlanB) {}
: PeerConnectionMediaBaseTest(SdpSemantics::kPlanB_DEPRECATED) {}
};
TEST_P(PeerConnectionMediaTest,
@ -694,7 +694,7 @@ INSTANTIATE_TEST_SUITE_P(
PeerConnectionMediaTest,
PeerConnectionMediaOfferDirectionTest,
Combine(
Values(SdpSemantics::kPlanB, SdpSemantics::kUnifiedPlan),
Values(SdpSemantics::kPlanB_DEPRECATED, SdpSemantics::kUnifiedPlan),
Values(std::make_tuple(false, -1, RtpTransceiverDirection::kInactive),
std::make_tuple(false, 0, RtpTransceiverDirection::kInactive),
std::make_tuple(false, 1, RtpTransceiverDirection::kRecvOnly),
@ -808,7 +808,7 @@ TEST_P(PeerConnectionMediaAnswerDirectionTest, VerifyRejected) {
INSTANTIATE_TEST_SUITE_P(PeerConnectionMediaTest,
PeerConnectionMediaAnswerDirectionTest,
Combine(Values(SdpSemantics::kPlanB,
Combine(Values(SdpSemantics::kPlanB_DEPRECATED,
SdpSemantics::kUnifiedPlan),
Values(RtpTransceiverDirection::kInactive,
RtpTransceiverDirection::kSendOnly,
@ -1049,7 +1049,7 @@ constexpr char kMLinesOutOfOrder[] =
INSTANTIATE_TEST_SUITE_P(
PeerConnectionMediaTest,
PeerConnectionMediaInvalidMediaTest,
Combine(Values(SdpSemantics::kPlanB, SdpSemantics::kUnifiedPlan),
Combine(Values(SdpSemantics::kPlanB_DEPRECATED, SdpSemantics::kUnifiedPlan),
Values(std::make_tuple("remove video",
RemoveVideoContent,
kMLinesOutOfOrder),
@ -2243,7 +2243,7 @@ TEST_F(PeerConnectionMediaTestUnifiedPlan,
INSTANTIATE_TEST_SUITE_P(PeerConnectionMediaTest,
PeerConnectionMediaTest,
Values(SdpSemantics::kPlanB,
Values(SdpSemantics::kPlanB_DEPRECATED,
SdpSemantics::kUnifiedPlan));
} // namespace webrtc

View file

@ -108,7 +108,7 @@ class PeerConnectionRtpBaseTest : public ::testing::Test {
std::unique_ptr<PeerConnectionWrapper> CreatePeerConnectionWithPlanB() {
RTCConfiguration config;
config.sdp_semantics = SdpSemantics::kPlanB;
config.sdp_semantics = SdpSemantics::kPlanB_DEPRECATED;
return CreatePeerConnectionInternal(config);
}
@ -154,7 +154,7 @@ class PeerConnectionRtpTest
class PeerConnectionRtpTestPlanB : public PeerConnectionRtpBaseTest {
protected:
PeerConnectionRtpTestPlanB()
: PeerConnectionRtpBaseTest(SdpSemantics::kPlanB) {}
: PeerConnectionRtpBaseTest(SdpSemantics::kPlanB_DEPRECATED) {}
};
class PeerConnectionRtpTestUnifiedPlan : public PeerConnectionRtpBaseTest {
@ -199,7 +199,7 @@ TEST_P(PeerConnectionRtpTest, AddTrackWithoutStreamFiresOnAddTrack) {
const auto& add_track_event = callee->observer()->add_track_events_[0];
EXPECT_EQ(add_track_event.streams, add_track_event.receiver->streams());
if (sdp_semantics_ == SdpSemantics::kPlanB) {
if (sdp_semantics_ == SdpSemantics::kPlanB_DEPRECATED) {
// Since we are not supporting the no stream case with Plan B, there should
// be a generated stream, even though we didn't set one with AddTrack.
ASSERT_EQ(1u, add_track_event.streams.size());
@ -542,7 +542,7 @@ TEST_P(PeerConnectionRtpTest, AddTrackWithoutStreamAddsReceiver) {
auto receiver_added = callee->pc()->GetReceivers()[0];
EXPECT_EQ("audio_track", receiver_added->track()->id());
if (sdp_semantics_ == SdpSemantics::kPlanB) {
if (sdp_semantics_ == SdpSemantics::kPlanB_DEPRECATED) {
// Since we are not supporting the no stream case with Plan B, there should
// be a generated stream, even though we didn't set one with AddTrack.
ASSERT_EQ(1u, receiver_added->streams().size());
@ -1991,7 +1991,7 @@ TEST_P(PeerConnectionRtpTest, CreateTwoSendersWithSameTrack) {
EXPECT_TRUE(sender2);
EXPECT_TRUE(sender1->SetTrack(track));
if (sdp_semantics_ == SdpSemantics::kPlanB) {
if (sdp_semantics_ == SdpSemantics::kPlanB_DEPRECATED) {
// TODO(hbos): When https://crbug.com/webrtc/8734 is resolved, this should
// return true, and doing `callee->SetRemoteDescription()` should work.
EXPECT_FALSE(caller->CreateOfferAndSetAsLocal());
@ -2033,7 +2033,7 @@ TEST_F(PeerConnectionRtpTestUnifiedPlan,
INSTANTIATE_TEST_SUITE_P(PeerConnectionRtpTest,
PeerConnectionRtpTest,
Values(SdpSemantics::kPlanB,
Values(SdpSemantics::kPlanB_DEPRECATED,
SdpSemantics::kUnifiedPlan));
} // namespace webrtc

View file

@ -468,7 +468,7 @@ TEST_P(PeerConnectionSignalingStateTest, SetRemoteAnswer) {
INSTANTIATE_TEST_SUITE_P(PeerConnectionSignalingTest,
PeerConnectionSignalingStateTest,
Combine(Values(SdpSemantics::kPlanB,
Combine(Values(SdpSemantics::kPlanB_DEPRECATED,
SdpSemantics::kUnifiedPlan),
Values(SignalingState::kStable,
SignalingState::kHaveLocalOffer,
@ -1100,7 +1100,7 @@ TEST_P(PeerConnectionSignalingTest, MidAttributeMaxLength) {
INSTANTIATE_TEST_SUITE_P(PeerConnectionSignalingTest,
PeerConnectionSignalingTest,
Values(SdpSemantics::kPlanB,
Values(SdpSemantics::kPlanB_DEPRECATED,
SdpSemantics::kUnifiedPlan));
class PeerConnectionSignalingUnifiedPlanTest