Update web-platform-tests to revision b8669365b81965f5400d6b13a7783415b44e679d

This commit is contained in:
WPT Sync Bot 2019-04-03 21:42:50 -04:00
parent 6fa1853bb1
commit bde105ca2e
42 changed files with 933 additions and 241 deletions

View file

@ -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) => {