aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorArtem Titov <titovartem@webrtc.org>2020-07-01 15:20:37 +0200
committerCommit Bot <commit-bot@chromium.org>2020-07-01 15:18:34 +0000
commit1ff3c584cd8e24f30db570adef68a2fae0076319 (patch)
tree434696daa22b2f5753aef717bd77c7319764ce8c /audio
parent51e08b8c196d42936c49f2e21145ec8af88a1cf0 (diff)
downloadwebrtc-1ff3c584cd8e24f30db570adef68a2fae0076319.tar.gz
Add TimeController to the CreatePeerConnectionE2EQualityTestFixture API
Add TimeController to the CreatePeerConnectionE2EQualityTestFixture method as a first step to make PC level framework compatible with TimeController abstraction. Bug: webrtc:11743 Change-Id: I69305abc880059bf9fe1d4f2e3b7c10cf35417db Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178485 Commit-Queue: Artem Titov <titovartem@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31607}
Diffstat (limited to 'audio')
-rw-r--r--audio/BUILD.gn1
-rw-r--r--audio/test/pc_low_bandwidth_audio_test.cc8
2 files changed, 6 insertions, 3 deletions
diff --git a/audio/BUILD.gn b/audio/BUILD.gn
index 7df741e9a7..d2826d5ee1 100644
--- a/audio/BUILD.gn
+++ b/audio/BUILD.gn
@@ -205,6 +205,7 @@ if (rtc_include_tests) {
"../api:network_emulation_manager_api",
"../api:peer_connection_quality_test_fixture_api",
"../api:simulated_network_api",
+ "../api:time_controller",
"../call:simulated_network",
"../common_audio",
"../system_wrappers",
diff --git a/audio/test/pc_low_bandwidth_audio_test.cc b/audio/test/pc_low_bandwidth_audio_test.cc
index dbc2376069..95a32238c5 100644
--- a/audio/test/pc_low_bandwidth_audio_test.cc
+++ b/audio/test/pc_low_bandwidth_audio_test.cc
@@ -17,6 +17,7 @@
#include "api/test/network_emulation_manager.h"
#include "api/test/peerconnection_quality_test_fixture.h"
#include "api/test/simulated_network.h"
+#include "api/test/time_controller.h"
#include "call/simulated_network.h"
#include "test/gtest.h"
#include "test/pc/e2e/network_quality_metrics_reporter.h"
@@ -71,12 +72,13 @@ CreateTwoNetworkLinks(NetworkEmulationManager* emulation,
std::unique_ptr<webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture>
CreateTestFixture(const std::string& test_case_name,
+ TimeController& time_controller,
std::pair<EmulatedNetworkManagerInterface*,
EmulatedNetworkManagerInterface*> network_links,
rtc::FunctionView<void(PeerConfigurer*)> alice_configurer,
rtc::FunctionView<void(PeerConfigurer*)> bob_configurer) {
auto fixture = webrtc_pc_e2e::CreatePeerConnectionE2EQualityTestFixture(
- test_case_name, /*audio_quality_analyzer=*/nullptr,
+ test_case_name, time_controller, /*audio_quality_analyzer=*/nullptr,
/*video_quality_analyzer=*/nullptr);
fixture->AddPeer(network_links.first->network_thread(),
network_links.first->network_manager(), alice_configurer);
@@ -128,7 +130,7 @@ TEST(PCLowBandwidthAudioTest, PCGoodNetworkHighBitrate) {
std::unique_ptr<NetworkEmulationManager> network_emulation_manager =
CreateNetworkEmulationManager();
auto fixture = CreateTestFixture(
- GetMetricTestCaseName(),
+ GetMetricTestCaseName(), *network_emulation_manager->time_controller(),
CreateTwoNetworkLinks(network_emulation_manager.get(),
BuiltInNetworkBehaviorConfig()),
[](PeerConfigurer* alice) {
@@ -155,7 +157,7 @@ TEST(PCLowBandwidthAudioTest, PC40kbpsNetwork) {
config.queue_delay_ms = 400;
config.loss_percent = 1;
auto fixture = CreateTestFixture(
- GetMetricTestCaseName(),
+ GetMetricTestCaseName(), *network_emulation_manager->time_controller(),
CreateTwoNetworkLinks(network_emulation_manager.get(), config),
[](PeerConfigurer* alice) {
AudioConfig audio;