diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:50 +0000 |
commit | def92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch) | |
tree | 2ef34b9ad8bb9a9220e05d60352558b15f513894 /third_party/libwebrtc/pc/peer_connection_simulcast_unittest.cc | |
parent | Adding debian version 125.0.3-1. (diff) | |
download | firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/pc/peer_connection_simulcast_unittest.cc')
-rw-r--r-- | third_party/libwebrtc/pc/peer_connection_simulcast_unittest.cc | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/third_party/libwebrtc/pc/peer_connection_simulcast_unittest.cc b/third_party/libwebrtc/pc/peer_connection_simulcast_unittest.cc index bffb5d9e9f..06f38848e1 100644 --- a/third_party/libwebrtc/pc/peer_connection_simulcast_unittest.cc +++ b/third_party/libwebrtc/pc/peer_connection_simulcast_unittest.cc @@ -102,21 +102,6 @@ std::ostream& operator<<( // no-presubmit-check TODO(webrtc:8982) } // namespace cricket -namespace { - -#if RTC_METRICS_ENABLED -std::vector<SimulcastLayer> CreateLayers(int num_layers, bool active) { - rtc::UniqueStringGenerator rid_generator; - std::vector<std::string> rids; - for (int i = 0; i < num_layers; ++i) { - rids.push_back(rid_generator.GenerateString()); - } - return webrtc::CreateLayers(rids, active); -} -#endif - -} // namespace - namespace webrtc { class PeerConnectionSimulcastTests : public ::testing::Test { @@ -214,16 +199,6 @@ class PeerConnectionSimulcastTests : public ::testing::Test { rtc::scoped_refptr<PeerConnectionFactoryInterface> pc_factory_; }; -#if RTC_METRICS_ENABLED -// This class is used to test the metrics emitted for simulcast. -class PeerConnectionSimulcastMetricsTests - : public PeerConnectionSimulcastTests, - public ::testing::WithParamInterface<int> { - protected: - PeerConnectionSimulcastMetricsTests() { metrics::Reset(); } -}; -#endif - // Validates that RIDs are supported arguments when adding a transceiver. TEST_F(PeerConnectionSimulcastTests, CanCreateTransceiverWithRid) { auto pc = CreatePeerConnectionWrapper(); @@ -603,27 +578,4 @@ TEST_F(PeerConnectionSimulcastTests, SimulcastSldModificationRejected) { EXPECT_TRUE(modified_offer); EXPECT_TRUE(local->SetLocalDescription(std::move(modified_offer))); } - -#if RTC_METRICS_ENABLED - -const int kMaxLayersInMetricsTest = 8; - -// Checks that the number of send encodings is logged in a metric. -TEST_P(PeerConnectionSimulcastMetricsTests, NumberOfSendEncodingsIsLogged) { - auto local = CreatePeerConnectionWrapper(); - auto num_layers = GetParam(); - auto layers = ::CreateLayers(num_layers, true); - AddTransceiver(local.get(), layers); - EXPECT_EQ(1, metrics::NumSamples( - "WebRTC.PeerConnection.Simulcast.NumberOfSendEncodings")); - EXPECT_EQ(1, metrics::NumEvents( - "WebRTC.PeerConnection.Simulcast.NumberOfSendEncodings", - num_layers)); -} - -INSTANTIATE_TEST_SUITE_P(NumberOfSendEncodings, - PeerConnectionSimulcastMetricsTests, - ::testing::Range(0, kMaxLayersInMetricsTest)); -#endif - } // namespace webrtc |