diff options
Diffstat (limited to 'third_party/libwebrtc/test/call_test.h')
-rw-r--r-- | third_party/libwebrtc/test/call_test.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/third_party/libwebrtc/test/call_test.h b/third_party/libwebrtc/test/call_test.h index 8d2b001f72..decf02f20b 100644 --- a/third_party/libwebrtc/test/call_test.h +++ b/third_party/libwebrtc/test/call_test.h @@ -17,6 +17,7 @@ #include "absl/types/optional.h" #include "api/array_view.h" +#include "api/environment/environment.h" #include "api/rtc_event_log/rtc_event_log.h" #include "api/task_queue/task_queue_base.h" #include "api/task_queue/task_queue_factory.h" @@ -52,6 +53,11 @@ class CallTest : public ::testing::Test, public RtpPacketSinkInterface { static const std::map<uint8_t, MediaType> payload_type_map_; protected: + const Environment& env() const { return env_; } + + void SetSendEventLog(std::unique_ptr<RtcEventLog> event_log); + void SetRecvEventLog(std::unique_ptr<RtcEventLog> event_log); + void RegisterRtpExtension(const RtpExtension& extension); // Returns header extensions that can be parsed by the transport. rtc::ArrayView<const RtpExtension> GetRegisteredExtensions() { @@ -62,6 +68,9 @@ class CallTest : public ::testing::Test, public RtpPacketSinkInterface { // to simplify test code. void RunBaseTest(BaseTest* test); + CallConfig SendCallConfig() const; + CallConfig RecvCallConfig() const; + void CreateCalls(); void CreateCalls(const CallConfig& sender_config, const CallConfig& receiver_config); @@ -185,13 +194,11 @@ class CallTest : public ::testing::Test, public RtpPacketSinkInterface { void OnRtpPacket(const RtpPacketReceived& packet) override; test::RunLoop loop_; - - Clock* const clock_; test::ScopedKeyValueConfig field_trials_; + Environment env_; + Environment send_env_; + Environment recv_env_; - std::unique_ptr<TaskQueueFactory> task_queue_factory_; - std::unique_ptr<webrtc::RtcEventLog> send_event_log_; - std::unique_ptr<webrtc::RtcEventLog> recv_event_log_; std::unique_ptr<Call> sender_call_; std::unique_ptr<PacketTransport> send_transport_; SimulatedNetworkInterface* send_simulated_network_ = nullptr; |