commit 0e7a10f1e24005ceb0af9b23cb1518abf0573f3a
parent 5a47cade7576141d33475b0e6c434f6f2c788e22
Author: Dan Baker <dbaker@mozilla.com>
Date: Wed, 19 Nov 2025 21:34:04 -0700
Bug 2000941 - Vendor libwebrtc from 9aa331c05c
Upstream commit: https://webrtc.googlesource.com/src/+/9aa331c05c7502d19f774d5d94facdbb5cc174b8
Remove gunit's WAIT_ macro
WaitUntil returns the value so this macro is not needed.
Bug: webrtc:381524905
Change-Id: Iefc560916c0caa192dbec489f5200352eeb62c0d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/407445
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45537}
Diffstat:
3 files changed, 12 insertions(+), 28 deletions(-)
diff --git a/third_party/libwebrtc/README.mozilla.last-vendor b/third_party/libwebrtc/README.mozilla.last-vendor
@@ -1,4 +1,4 @@
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
-libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-11-20T04:31:09.060649+00:00.
+libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-11-20T04:33:49.195971+00:00.
# base of lastest vendoring
-99da2214ee
+9aa331c05c
diff --git a/third_party/libwebrtc/pc/slow_peer_connection_integration_test.cc b/third_party/libwebrtc/pc/slow_peer_connection_integration_test.cc
@@ -35,7 +35,6 @@
#include "rtc_base/fake_clock.h"
#include "rtc_base/fake_network.h"
#include "rtc_base/firewall_socket_server.h"
-#include "rtc_base/gunit.h"
#include "rtc_base/logging.h"
#include "rtc_base/socket_address.h"
#include "rtc_base/test_certificate_verifier.h"
@@ -222,11 +221,11 @@ TEST_P(PeerConnectionIntegrationTest,
options.offer_to_receive_video = 1;
caller()->SetOfferAnswerOptions(options);
caller()->CreateAndSetAndSignalOffer();
- bool wait_res = true;
+ bool wait_res = WaitUntil([&]() { return DtlsConnected(); },
+ {.timeout = kDefaultTimeout});
// TODO(bugs.webrtc.org/9219): When IceConnectionState is implemented
// properly, should be able to just wait for a state of "failed" instead of
// waiting a fixed 10 seconds.
- WAIT_(DtlsConnected(), kDefaultTimeout.ms(), wait_res);
ASSERT_FALSE(wait_res);
EXPECT_GT(client_1_cert_verifier->call_count_, 0u);
@@ -255,15 +254,14 @@ TEST_P(PeerConnectionIntegrationTest, GetCaptureStartNtpTimeWithOldStatsApi) {
// Get the audio output level stats. Note that the level is not available
// until an RTCP packet has been received.
- EXPECT_THAT(
- WaitUntil(
- [&] {
- return callee()
- ->OldGetStatsForTrack(remote_audio_track.get())
- ->CaptureStartNtpTime();
- },
- ::testing::Gt(0), {.timeout = 2 * kMaxWaitForFrames}),
- IsRtcOk());
+ EXPECT_THAT(WaitUntil(
+ [&] {
+ return callee()
+ ->OldGetStatsForTrack(remote_audio_track.get())
+ ->CaptureStartNtpTime();
+ },
+ ::testing::Gt(0), {.timeout = 2 * kMaxWaitForFrames}),
+ IsRtcOk());
}
// Test that firewalling the ICE connection causes the clients to identify the
diff --git a/third_party/libwebrtc/rtc_base/gunit.h b/third_party/libwebrtc/rtc_base/gunit.h
@@ -23,20 +23,6 @@
::webrtc::Thread::Current()->SleepMs(1); \
}
-// This returns the result of the test in res, so that we don't re-evaluate
-// the expression in the XXXX_WAIT macros below, since that causes problems
-// when the expression is only true the first time you check it.
-#define WAIT_(ex, timeout, res) \
- do { \
- int64_t wait_start = ::webrtc::SystemTimeMillis(); \
- res = (ex) && true; \
- while (!res && ::webrtc::SystemTimeMillis() < wait_start + (timeout)) { \
- ::webrtc::Thread::Current()->ProcessMessages(0); \
- ::webrtc::Thread::Current()->SleepMs(1); \
- res = (ex) && true; \
- } \
- } while (0)
-
// Wait until "ex" is true, or "timeout" expires, using fake clock where
// messages are processed every millisecond.
// TODO(pthatcher): Allow tests to control how many milliseconds to advance.