Update web-platform-tests to revision d3cf77a7b8c20c678b725238eaa8a72eca3787ae

This commit is contained in:
WPT Sync Bot 2019-04-25 22:18:37 -04:00
parent 880f3b8b7a
commit efca990ffe
541 changed files with 8000 additions and 2276 deletions

View file

@ -132,4 +132,31 @@
await pc1.setLocalDescription(offer1);
}, `local offer created before setRemoteDescription(remote offer) then rollback should still be usable`);
promise_test(async t => {
const pc1 = new RTCPeerConnection();
const pc2 = new RTCPeerConnection();
t.add_cleanup(() => pc1.close());
t.add_cleanup(() => pc2.close());
const stream = await getNoiseStream({ video: true });
t.add_cleanup(() => stream.getTracks().forEach(track => track.stop()));
pc1.addTrack(stream.getTracks()[0], stream);
// We don't use this right away. pc1 has provisionally decided that the
// (only) transceiver is bound to level 0.
const offer1 = await pc1.createOffer();
// Create offer from pc2, apply and rollback on pc1
const offer2 = await pc2.createOffer({offerToReceiveAudio: true, offerToReceiveVideo: true});
// pc1 now should change its mind about what level its video transceiver is
// bound to. It was 0, now it is 1.
await pc1.setRemoteDescription(offer2);
// Rolling back should put things back the way they were.
await pc1.setRemoteDescription({type: "rollback"});
// Then try applying pc1's old offer
await pc1.setLocalDescription(offer1);
}, "local offer created before setRemoteDescription(remote offer) with different transceiver level assignments then rollback should still be usable");
</script>