Update web-platform-tests to revision ac3d096a5972dea5ecca1c43e324086895db7c6f

This commit is contained in:
WPT Sync Bot 2019-05-25 10:23:28 +00:00
parent 1c74a80e28
commit db54f176d0
47 changed files with 860 additions and 246 deletions

View file

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