diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /third_party/libwebrtc/pc/rtc_stats_integrationtest.cc | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/pc/rtc_stats_integrationtest.cc')
-rw-r--r-- | third_party/libwebrtc/pc/rtc_stats_integrationtest.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/third_party/libwebrtc/pc/rtc_stats_integrationtest.cc b/third_party/libwebrtc/pc/rtc_stats_integrationtest.cc index 002f9d34b5..de8e6e3f67 100644 --- a/third_party/libwebrtc/pc/rtc_stats_integrationtest.cc +++ b/third_party/libwebrtc/pc/rtc_stats_integrationtest.cc @@ -18,6 +18,7 @@ #include "absl/algorithm/container.h" #include "absl/strings/match.h" +#include "absl/types/optional.h" #include "api/audio_codecs/builtin_audio_decoder_factory.h" #include "api/audio_codecs/builtin_audio_encoder_factory.h" #include "api/audio_options.h" @@ -212,14 +213,14 @@ class RTCStatsVerifier { } template <typename T> - void MarkAttributeTested(const RTCStatsMember<T>& field, + void MarkAttributeTested(const absl::optional<T>& field, bool test_successful) { untested_attribute_names_.erase(stats_->GetAttribute(field).name()); all_tests_successful_ &= test_successful; } template <typename T> - void TestAttributeIsDefined(const RTCStatsMember<T>& field) { + void TestAttributeIsDefined(const absl::optional<T>& field) { EXPECT_TRUE(field.has_value()) << stats_->type() << "." << stats_->GetAttribute(field).name() << "[" << stats_->id() << "] was undefined."; @@ -227,7 +228,7 @@ class RTCStatsVerifier { } template <typename T> - void TestAttributeIsUndefined(const RTCStatsMember<T>& field) { + void TestAttributeIsUndefined(const absl::optional<T>& field) { Attribute attribute = stats_->GetAttribute(field); EXPECT_FALSE(field.has_value()) << stats_->type() << "." << attribute.name() << "[" << stats_->id() @@ -236,7 +237,7 @@ class RTCStatsVerifier { } template <typename T> - void TestAttributeIsPositive(const RTCStatsMember<T>& field) { + void TestAttributeIsPositive(const absl::optional<T>& field) { Attribute attribute = stats_->GetAttribute(field); EXPECT_TRUE(field.has_value()) << stats_->type() << "." << attribute.name() << "[" << stats_->id() << "] was undefined."; @@ -252,7 +253,7 @@ class RTCStatsVerifier { } template <typename T> - void TestAttributeIsNonNegative(const RTCStatsMember<T>& field) { + void TestAttributeIsNonNegative(const absl::optional<T>& field) { Attribute attribute = stats_->GetAttribute(field); EXPECT_TRUE(field.has_value()) << stats_->type() << "." << attribute.name() << "[" << stats_->id() << "] was undefined."; @@ -268,13 +269,13 @@ class RTCStatsVerifier { } template <typename T> - void TestAttributeIsIDReference(const RTCStatsMember<T>& field, + void TestAttributeIsIDReference(const absl::optional<T>& field, const char* expected_type) { TestAttributeIsIDReference(field, expected_type, false); } template <typename T> - void TestAttributeIsOptionalIDReference(const RTCStatsMember<T>& field, + void TestAttributeIsOptionalIDReference(const absl::optional<T>& field, const char* expected_type) { TestAttributeIsIDReference(field, expected_type, true); } @@ -291,7 +292,7 @@ class RTCStatsVerifier { private: template <typename T> - void TestAttributeIsIDReference(const RTCStatsMember<T>& field, + void TestAttributeIsIDReference(const absl::optional<T>& field, const char* expected_type, bool optional) { if (optional && !field.has_value()) { |