summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webrtc/RTCRtpSender-getStats.https.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /testing/web-platform/tests/webrtc/RTCRtpSender-getStats.https.html
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/webrtc/RTCRtpSender-getStats.https.html')
-rw-r--r--testing/web-platform/tests/webrtc/RTCRtpSender-getStats.https.html20
1 files changed, 10 insertions, 10 deletions
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'));