From 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:33 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- .../tests/webrtc/RTCRtpSender-getStats.https.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'testing/web-platform/tests/webrtc/RTCRtpSender-getStats.https.html') diff --git a/testing/web-platform/tests/webrtc/RTCRtpSender-getStats.https.html b/testing/web-platform/tests/webrtc/RTCRtpSender-getStats.https.html index 5c27af2134..6aeed650e5 100644 --- a/testing/web-platform/tests/webrtc/RTCRtpSender-getStats.https.html +++ b/testing/web-platform/tests/webrtc/RTCRtpSender-getStats.https.html @@ -22,8 +22,8 @@ exchangeIceCandidates(caller, callee); await exchangeOfferAnswer(caller, callee); const [ receiver ] = callee.getReceivers(); - // Wait for RTP - await new Promise(r => receiver.track.onunmute = r); + await listenToConnected(callee); + await waitForTrackUnmuted(receiver.track); const statsReport = await sender.getStats(); assert_true(!![...statsReport.values()].find(({type}) => type === 'outbound-rtp')); }, 'sender.getStats() via addTransceiver should return stats report containing outbound-rtp stats'); @@ -41,8 +41,8 @@ exchangeIceCandidates(caller, callee); await exchangeOfferAnswer(caller, callee); const [ receiver ] = callee.getReceivers(); - // Wait for RTP - await new Promise(r => receiver.track.onunmute = r); + await listenToConnected(callee); + await waitForTrackUnmuted(receiver.track); const statsReport = await sender.getStats(); assert_true(!![...statsReport.values()].find(({type}) => type === 'outbound-rtp')); }, 'sender.getStats() via addTrack should return stats report containing outbound-rtp stats'); @@ -60,8 +60,8 @@ exchangeIceCandidates(caller, callee); await exchangeOfferAnswer(caller, callee); const [ receiver ] = callee.getReceivers(); - // Wait for RTP - await new Promise(r => receiver.track.onunmute = r); + await listenToConnected(callee); + await waitForTrackUnmuted(receiver.track); const [sender] = caller.getSenders(); const [transceiver] = caller.getTransceivers(); @@ -85,8 +85,8 @@ exchangeIceCandidates(caller, callee); await exchangeOfferAnswer(caller, callee); const [ receiver ] = callee.getReceivers(); - // Wait for RTP - await new Promise(r => receiver.track.onunmute = r); + await listenToConnected(callee); + await waitForTrackUnmuted(receiver.track); const [sender] = caller.getSenders(); const statsReportFirst = await sender.getStats(); caller.close(); @@ -108,8 +108,8 @@ exchangeIceCandidates(caller, callee); await exchangeOfferAnswer(caller, callee); const [ receiver ] = callee.getReceivers(); - // Wait for RTP - await new Promise(r => receiver.track.onunmute = r); + await listenToConnected(callee); + await waitForTrackUnmuted(receiver.track); const statsReport = await sender.getStats(); assert_true(!![...statsReport.values()].find(({type}) => type === 'candidate-pair')); assert_true(!![...statsReport.values()].find(({type}) => type === 'local-candidate')); -- cgit v1.2.3