Move PacketOptions-related tests to rtp_sender_egress_unittest.cc

Bug: webrtc:11340
Change-Id: I7fc405346e79c5308806d4c20fdb871a91dc59ff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217721
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33948}
This commit is contained in:
Erik Språng
2021-05-07 14:16:34 +02:00
committed by WebRTC LUCI CQ
parent 3dadf8b06f
commit f2e581a740
2 changed files with 57 additions and 54 deletions

View File

@ -545,60 +545,6 @@ TEST_P(RtpSenderTest, PaddingAlwaysAllowedOnAudio) {
EXPECT_EQ(kMinPaddingSize, GenerateAndSendPadding(kMinPaddingSize - 5));
}
TEST_P(RtpSenderTestWithoutPacer, PacketOptionsNoRetransmission) {
RtpRtcpInterface::Configuration config;
config.clock = clock_;
config.outgoing_transport = &transport_;
config.local_media_ssrc = kSsrc;
config.transport_feedback_callback = &feedback_observer_;
config.event_log = &mock_rtc_event_log_;
config.send_packet_observer = &send_packet_observer_;
config.retransmission_rate_limiter = &retransmission_rate_limiter_;
rtp_sender_context_ =
std::make_unique<RtpSenderContext>(config, &time_controller_);
SendGenericPacket();
EXPECT_FALSE(transport_.last_options_.is_retransmit);
}
TEST_P(RtpSenderTestWithoutPacer,
SetsIncludedInFeedbackWhenTransportSequenceNumberExtensionIsRegistered) {
SetUpRtpSender(false, false, false);
rtp_sender()->RegisterRtpHeaderExtension(TransportSequenceNumber::kUri,
kTransportSequenceNumberExtensionId);
EXPECT_CALL(send_packet_observer_, OnSendPacket).Times(1);
SendGenericPacket();
EXPECT_TRUE(transport_.last_options_.included_in_feedback);
}
TEST_P(
RtpSenderTestWithoutPacer,
SetsIncludedInAllocationWhenTransportSequenceNumberExtensionIsRegistered) {
SetUpRtpSender(false, false, false);
rtp_sender()->RegisterRtpHeaderExtension(TransportSequenceNumber::kUri,
kTransportSequenceNumberExtensionId);
EXPECT_CALL(send_packet_observer_, OnSendPacket).Times(1);
SendGenericPacket();
EXPECT_TRUE(transport_.last_options_.included_in_allocation);
}
TEST_P(RtpSenderTestWithoutPacer,
SetsIncludedInAllocationWhenForcedAsPartOfAllocation) {
SetUpRtpSender(false, false, false);
rtp_egress()->ForceIncludeSendPacketsInAllocation(true);
SendGenericPacket();
EXPECT_FALSE(transport_.last_options_.included_in_feedback);
EXPECT_TRUE(transport_.last_options_.included_in_allocation);
}
TEST_P(RtpSenderTestWithoutPacer, DoesnSetIncludedInAllocationByDefault) {
SetUpRtpSender(false, false, false);
SendGenericPacket();
EXPECT_FALSE(transport_.last_options_.included_in_feedback);
EXPECT_FALSE(transport_.last_options_.included_in_allocation);
}
TEST_P(RtpSenderTestWithoutPacer, OnSendSideDelayUpdated) {
StrictMock<MockSendSideDelayObserver> send_side_delay_observer_;