mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
Update web-platform-tests to revision ac3d096a5972dea5ecca1c43e324086895db7c6f
This commit is contained in:
parent
1c74a80e28
commit
db54f176d0
47 changed files with 860 additions and 246 deletions
|
@ -309,6 +309,21 @@ function listenToConnected(pc) {
|
|||
});
|
||||
}
|
||||
|
||||
// Returns a promise that resolves when |pc.connectionState| is in one of the
|
||||
// wanted states.
|
||||
function waitForConnectionStateChange(pc, wantedStates) {
|
||||
return new Promise((resolve) => {
|
||||
if (wantedStates.includes(pc.connectionState)) {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
pc.addEventListener('connectionstatechange', () => {
|
||||
if (wantedStates.includes(pc.connectionState))
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Resolves when RTP packets have been received.
|
||||
function listenForSSRCs(t, receiver) {
|
||||
return new Promise((resolve) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue