mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision b8669365b81965f5400d6b13a7783415b44e679d
This commit is contained in:
parent
6fa1853bb1
commit
bde105ca2e
42 changed files with 933 additions and 241 deletions
|
@ -224,6 +224,21 @@ function listenToIceConnected(pc) {
|
|||
});
|
||||
}
|
||||
|
||||
// Returns a promise that resolves when |pc.iceConnectionState| is in one of the
|
||||
// wanted states.
|
||||
function waitForIceStateChange(pc, wantedStates) {
|
||||
return new Promise((resolve) => {
|
||||
if (wantedStates.includes(pc.iceConnectionState)) {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
pc.addEventListener('iceconnectionstatechange', () => {
|
||||
if (wantedStates.includes(pc.iceConnectionState))
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Returns a promise that resolves when |pc.connectionState| is 'connected'.
|
||||
function listenToConnected(pc) {
|
||||
return new Promise((resolve) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue