зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1547278 - Part 0: Test case for the bug. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D29404 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
c00716af37
Коммит
cb2f09c730
|
@ -171,4 +171,25 @@
|
|||
await pc1.setLocalDescription(offer);
|
||||
}, "Setting previously generated offer after a call to createAnswer should work");
|
||||
|
||||
promise_test(async t => {
|
||||
const pc1 = new RTCPeerConnection();
|
||||
t.add_cleanup(() => pc1.close());
|
||||
const pc2 = new RTCPeerConnection();
|
||||
t.add_cleanup(() => pc2.close());
|
||||
|
||||
await pc1.setLocalDescription(await pc1.createOffer({offerToReceiveAudio: true}));
|
||||
|
||||
const offer = await pc1.createOffer();
|
||||
await pc1.setLocalDescription(offer);
|
||||
await pc2.setRemoteDescription(offer);
|
||||
const answer = await pc2.createAnswer();
|
||||
await pc2.setLocalDescription(answer);
|
||||
await pc1.setRemoteDescription(answer);
|
||||
|
||||
assert_equals(pc1.getTransceivers().length, 1);
|
||||
assert_equals(pc1.getTransceivers()[0].receiver.track.kind, "audio");
|
||||
assert_equals(pc2.getTransceivers().length, 1);
|
||||
assert_equals(pc2.getTransceivers()[0].receiver.track.kind, "audio");
|
||||
}, "Negotiation works when there has been a repeated setLocalDescription(offer)");
|
||||
|
||||
</script>
|
||||
|
|
Загрузка…
Ссылка в новой задаче