diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /third_party/libwebrtc/pc/rtp_transceiver_unittest.cc | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/pc/rtp_transceiver_unittest.cc')
-rw-r--r-- | third_party/libwebrtc/pc/rtp_transceiver_unittest.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/third_party/libwebrtc/pc/rtp_transceiver_unittest.cc b/third_party/libwebrtc/pc/rtp_transceiver_unittest.cc index 8b4a2389ce..d75e964509 100644 --- a/third_party/libwebrtc/pc/rtp_transceiver_unittest.cc +++ b/third_party/libwebrtc/pc/rtp_transceiver_unittest.cc @@ -17,10 +17,11 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" +#include "api/environment/environment_factory.h" #include "api/peer_connection_interface.h" #include "api/rtp_parameters.h" -#include "media/base/fake_media_engine.h" #include "media/base/media_engine.h" +#include "pc/test/enable_fake_media.h" #include "pc/test/mock_channel_interface.h" #include "pc/test/mock_rtp_receiver_internal.h" #include "pc/test/mock_rtp_sender_internal.h" @@ -44,7 +45,8 @@ class RtpTransceiverTest : public testing::Test { public: RtpTransceiverTest() : dependencies_(MakeDependencies()), - context_(ConnectionContext::Create(&dependencies_)) {} + context_( + ConnectionContext::Create(CreateEnvironment(), &dependencies_)) {} protected: cricket::MediaEngineInterface* media_engine() { @@ -60,7 +62,7 @@ class RtpTransceiverTest : public testing::Test { d.network_thread = rtc::Thread::Current(); d.worker_thread = rtc::Thread::Current(); d.signaling_thread = rtc::Thread::Current(); - d.media_engine = std::make_unique<cricket::FakeMediaEngine>(); + EnableFakeMedia(d); return d; } @@ -420,8 +422,8 @@ TEST_F(RtpTransceiverTestForHeaderExtensions, ReturnsNegotiatedHdrExts) { EXPECT_CALL(*mock_channel, mid()).WillRepeatedly(ReturnRef(content_name)); EXPECT_CALL(*mock_channel, SetRtpTransport(_)).WillRepeatedly(Return(true)); - cricket::RtpHeaderExtensions extensions = {webrtc::RtpExtension("uri1", 1), - webrtc::RtpExtension("uri2", 2)}; + cricket::RtpHeaderExtensions extensions = {RtpExtension("uri1", 1), + RtpExtension("uri2", 2)}; cricket::AudioContentDescription description; description.set_rtp_header_extensions(extensions); transceiver_->OnNegotiationUpdate(SdpType::kAnswer, &description); @@ -449,8 +451,8 @@ TEST_F(RtpTransceiverTestForHeaderExtensions, EXPECT_CALL(*sender_.get(), SetTransceiverAsStopped()); EXPECT_CALL(*sender_.get(), Stop()); - cricket::RtpHeaderExtensions extensions = {webrtc::RtpExtension("uri1", 1), - webrtc::RtpExtension("uri2", 2)}; + cricket::RtpHeaderExtensions extensions = {RtpExtension("uri1", 1), + RtpExtension("uri2", 2)}; cricket::AudioContentDescription description; description.set_rtp_header_extensions(extensions); transceiver_->OnNegotiationUpdate(SdpType::kAnswer, &description); @@ -464,8 +466,7 @@ TEST_F(RtpTransceiverTestForHeaderExtensions, RtpTransceiverDirection::kStopped), Field(&RtpHeaderExtensionCapability::direction, RtpTransceiverDirection::kStopped))); - extensions = {webrtc::RtpExtension("uri3", 4), - webrtc::RtpExtension("uri5", 6)}; + extensions = {RtpExtension("uri3", 4), RtpExtension("uri5", 6)}; description.set_rtp_header_extensions(extensions); transceiver_->OnNegotiationUpdate(SdpType::kAnswer, &description); |