diff --git a/api/test/peerconnection_quality_test_fixture.h b/api/test/peerconnection_quality_test_fixture.h index fb7264b687..63751c341c 100644 --- a/api/test/peerconnection_quality_test_fixture.h +++ b/api/test/peerconnection_quality_test_fixture.h @@ -509,7 +509,11 @@ class PeerConnectionE2EQualityTestFixture { virtual PeerHandle* AddPeer( rtc::Thread* network_thread, rtc::NetworkManager* network_manager, - rtc::FunctionView configurer) = 0; + rtc::FunctionView configurer) { + return AddPeer({network_thread, network_manager, + /*packet_socket_factory=*/nullptr}, + configurer); + } // Runs the media quality test, which includes setting up the call with // configured participants, running it according to provided `run_params` and // terminating it properly at the end. During call duration media quality diff --git a/test/pc/e2e/peer_configurer.h b/test/pc/e2e/peer_configurer.h index bacfb7a295..d96758e59c 100644 --- a/test/pc/e2e/peer_configurer.h +++ b/test/pc/e2e/peer_configurer.h @@ -43,9 +43,12 @@ class PeerConfigurerImpl final PeerConnectionE2EQualityTestFixture::CapturingDeviceIndex>; PeerConfigurerImpl(rtc::Thread* network_thread, - rtc::NetworkManager* network_manager) - : components_(std::make_unique(network_thread, - network_manager)), + rtc::NetworkManager* network_manager, + rtc::PacketSocketFactory* packet_socket_factory = nullptr) + : components_( + std::make_unique(network_thread, + network_manager, + packet_socket_factory)), params_(std::make_unique()) {} PeerConfigurer* SetName(absl::string_view name) override { diff --git a/test/pc/e2e/peer_connection_quality_test_params.h b/test/pc/e2e/peer_connection_quality_test_params.h index 9ac9c21e10..9225ddf5ee 100644 --- a/test/pc/e2e/peer_connection_quality_test_params.h +++ b/test/pc/e2e/peer_connection_quality_test_params.h @@ -67,12 +67,15 @@ struct PeerConnectionFactoryComponents { // so client can't inject its own. Also only network manager can be overridden // inside port allocator. struct PeerConnectionComponents { - explicit PeerConnectionComponents(rtc::NetworkManager* network_manager) - : network_manager(network_manager) { + PeerConnectionComponents(rtc::NetworkManager* network_manager, + rtc::PacketSocketFactory* packet_socket_factory) + : network_manager(network_manager), + packet_socket_factory(packet_socket_factory) { RTC_CHECK(network_manager); } rtc::NetworkManager* const network_manager; + rtc::PacketSocketFactory* const packet_socket_factory; std::unique_ptr async_resolver_factory; std::unique_ptr cert_generator; std::unique_ptr tls_cert_verifier; @@ -82,12 +85,14 @@ struct PeerConnectionComponents { // Contains all components, that can be overridden in peer connection. Also // has a network thread, that will be used to communicate with another peers. struct InjectableComponents { - explicit InjectableComponents(rtc::Thread* network_thread, - rtc::NetworkManager* network_manager) + InjectableComponents(rtc::Thread* network_thread, + rtc::NetworkManager* network_manager, + rtc::PacketSocketFactory* packet_socket_factory) : network_thread(network_thread), pcf_dependencies(std::make_unique()), pc_dependencies( - std::make_unique(network_manager)) { + std::make_unique(network_manager, + packet_socket_factory)) { RTC_CHECK(network_thread); }