diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /third_party/libwebrtc/pc/peer_connection_signaling_unittest.cc | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | third_party/libwebrtc/pc/peer_connection_signaling_unittest.cc | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/third_party/libwebrtc/pc/peer_connection_signaling_unittest.cc b/third_party/libwebrtc/pc/peer_connection_signaling_unittest.cc index 190fb38b43..7764be923d 100644 --- a/third_party/libwebrtc/pc/peer_connection_signaling_unittest.cc +++ b/third_party/libwebrtc/pc/peer_connection_signaling_unittest.cc @@ -64,6 +64,7 @@ #include "rtc_base/rtc_certificate_generator.h" #include "rtc_base/string_encode.h" #include "rtc_base/thread.h" +#include "test/gmock.h" #include "test/gtest.h" #ifdef WEBRTC_ANDROID #include "pc/test/android_test_initializer.h" @@ -80,6 +81,7 @@ using RTCConfiguration = PeerConnectionInterface::RTCConfiguration; using RTCOfferAnswerOptions = PeerConnectionInterface::RTCOfferAnswerOptions; using ::testing::Bool; using ::testing::Combine; +using ::testing::StartsWith; using ::testing::Values; namespace { @@ -343,8 +345,7 @@ TEST_P(PeerConnectionSignalingStateTest, CreateOffer) { } else { std::string error; ASSERT_FALSE(wrapper->CreateOffer(RTCOfferAnswerOptions(), &error)); - EXPECT_PRED_FORMAT2(AssertStartsWith, error, - "CreateOffer called when PeerConnection is closed."); + EXPECT_EQ(error, "CreateOffer called when PeerConnection is closed."); } } @@ -379,9 +380,9 @@ TEST_P(PeerConnectionSignalingStateTest, SetLocalOffer) { std::string error; ASSERT_FALSE(wrapper->SetLocalDescription(std::move(offer), &error)); - EXPECT_PRED_FORMAT2( - AssertStartsWith, error, - "Failed to set local offer sdp: Called in wrong state:"); + EXPECT_THAT( + error, + StartsWith("Failed to set local offer sdp: Called in wrong state:")); } } @@ -398,9 +399,9 @@ TEST_P(PeerConnectionSignalingStateTest, SetLocalPrAnswer) { } else { std::string error; ASSERT_FALSE(wrapper->SetLocalDescription(std::move(pranswer), &error)); - EXPECT_PRED_FORMAT2( - AssertStartsWith, error, - "Failed to set local pranswer sdp: Called in wrong state:"); + EXPECT_THAT( + error, + StartsWith("Failed to set local pranswer sdp: Called in wrong state:")); } } @@ -416,9 +417,9 @@ TEST_P(PeerConnectionSignalingStateTest, SetLocalAnswer) { } else { std::string error; ASSERT_FALSE(wrapper->SetLocalDescription(std::move(answer), &error)); - EXPECT_PRED_FORMAT2( - AssertStartsWith, error, - "Failed to set local answer sdp: Called in wrong state:"); + EXPECT_THAT( + error, + StartsWith("Failed to set local answer sdp: Called in wrong state:")); } } @@ -435,9 +436,9 @@ TEST_P(PeerConnectionSignalingStateTest, SetRemoteOffer) { } else { std::string error; ASSERT_FALSE(wrapper->SetRemoteDescription(std::move(offer), &error)); - EXPECT_PRED_FORMAT2( - AssertStartsWith, error, - "Failed to set remote offer sdp: Called in wrong state:"); + EXPECT_THAT( + error, + StartsWith("Failed to set remote offer sdp: Called in wrong state:")); } } @@ -454,9 +455,10 @@ TEST_P(PeerConnectionSignalingStateTest, SetRemotePrAnswer) { } else { std::string error; ASSERT_FALSE(wrapper->SetRemoteDescription(std::move(pranswer), &error)); - EXPECT_PRED_FORMAT2( - AssertStartsWith, error, - "Failed to set remote pranswer sdp: Called in wrong state:"); + EXPECT_THAT( + error, + StartsWith( + "Failed to set remote pranswer sdp: Called in wrong state:")); } } @@ -472,9 +474,9 @@ TEST_P(PeerConnectionSignalingStateTest, SetRemoteAnswer) { } else { std::string error; ASSERT_FALSE(wrapper->SetRemoteDescription(std::move(answer), &error)); - EXPECT_PRED_FORMAT2( - AssertStartsWith, error, - "Failed to set remote answer sdp: Called in wrong state:"); + EXPECT_THAT( + error, + StartsWith("Failed to set remote answer sdp: Called in wrong state:")); } } |