mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1568296: Test cases for RTCRtpTransceiver.[[Stopping]]. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D175260
This commit is contained in:
parent
cbdc1744cf
commit
d8ce598494
@ -1,4 +0,0 @@
|
||||
[RTCPeerConnection-setDescription-transceiver.html]
|
||||
[setRemoteDescription should set transceiver inactive if its corresponding m section is rejected]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1728367
|
||||
expected: FAIL
|
@ -3,5 +3,3 @@
|
||||
if os == "android": https://bugzilla.mozilla.org/show_bug.cgi?id=1641237
|
||||
expected:
|
||||
if (os == "android") and fission: [OK, TIMEOUT]
|
||||
[Closing the PC stops the transceivers]
|
||||
expected: FAIL
|
||||
|
@ -1,8 +0,0 @@
|
||||
[RTCRtpTransceiver-stop.html]
|
||||
[If a transceiver is stopped, transceivers should end up in state stopped]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1568296
|
||||
expected: FAIL
|
||||
|
||||
[If a transceiver is stopped, transceivers, senders and receivers should disappear after offer/answer]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1568296
|
||||
expected: FAIL
|
@ -1,2 +0,0 @@
|
||||
[RTCRtpTransceiver-stopping.https.html]
|
||||
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1568296
|
@ -1,42 +1,3 @@
|
||||
[RTCRtpTransceiver.https.html]
|
||||
restart-after:
|
||||
if os == "android": https://bugzilla.mozilla.org/show_bug.cgi?id=1641237
|
||||
[checkStop]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1568296
|
||||
expected: FAIL
|
||||
|
||||
[checkStopAfterCreateOffer]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1568296
|
||||
expected: FAIL
|
||||
|
||||
[checkStopAfterSetLocalOffer]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1568296
|
||||
expected: FAIL
|
||||
|
||||
[checkStopAfterSetRemoteOffer]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1568296
|
||||
expected: FAIL
|
||||
|
||||
[checkStopAfterCreateAnswer]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1568296
|
||||
expected: FAIL
|
||||
|
||||
[checkStopAfterSetLocalAnswer]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1568296
|
||||
expected: FAIL
|
||||
|
||||
[checkLocalRollback]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1568296
|
||||
expected: FAIL
|
||||
|
||||
[checkRemoteRollback]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1568296
|
||||
expected: FAIL
|
||||
|
||||
[checkCurrentDirection]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1568296
|
||||
expected: FAIL
|
||||
|
||||
[checkMsectionReuse]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1568296
|
||||
expected: FAIL
|
||||
|
@ -301,6 +301,8 @@
|
||||
const sender = pc.addTrack(track, stream);
|
||||
|
||||
pc.getTransceivers()[0].stop();
|
||||
// TODO: Spec says this only sets [[Stopping]], not [[Stopped]]. Spec
|
||||
// might change: https://github.com/w3c/webrtc-pc/issues/2874
|
||||
pc.removeTrack(sender);
|
||||
assert_equals(sender.track, track);
|
||||
}, "Calling removeTrack on a stopped transceiver should be a no-op");
|
||||
|
@ -79,7 +79,6 @@
|
||||
const transceiver = pc.addTransceiver('audio');
|
||||
const { sender } = transceiver;
|
||||
transceiver.stop();
|
||||
|
||||
return promise_rejects_dom(t, 'InvalidStateError',
|
||||
sender.replaceTrack(track));
|
||||
}, 'Calling replaceTrack on stopped sender should reject with InvalidStateError');
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
const param = sender.getParameters();
|
||||
transceiver.stop();
|
||||
|
||||
return promise_rejects_dom(t, 'InvalidStateError',
|
||||
sender.setParameters(param));
|
||||
}, `setParameters() when transceiver is stopped should reject with InvalidStateError`);
|
||||
|
@ -49,8 +49,7 @@
|
||||
t.add_cleanup(() => pc.close());
|
||||
|
||||
const transceiver = pc.addTransceiver(kind);
|
||||
const trackEnded = new Promise(
|
||||
r => { transceiver.receiver.track.onended = () => { r(); } });
|
||||
const trackEnded = new Promise(r => transceiver.receiver.track.onended = r);
|
||||
assert_equals(transceiver.receiver.track.readyState, 'live');
|
||||
transceiver.stop();
|
||||
// Stopping triggers ending the track, but this happens asynchronously.
|
||||
@ -79,6 +78,10 @@
|
||||
// Applying the remote offer immediately ends the track, we don't need to
|
||||
// create or apply an answer.
|
||||
await pc2.setRemoteDescription(pc1.localDescription);
|
||||
// sRD just resolved, so we're in the success task for sRD. The transition
|
||||
// from live -> ended is queued right now.
|
||||
assert_equals(pc2Transceiver.receiver.track.readyState, 'live');
|
||||
await new Promise(r => pc2Transceiver.receiver.track.onended = r);
|
||||
assert_equals(pc2Transceiver.receiver.track.readyState, 'ended');
|
||||
}, `[${kind}] Remotely stopping a transceiver ends the track`);
|
||||
|
||||
@ -152,8 +155,12 @@
|
||||
const [pc2Transceiver] = pc2.getTransceivers();
|
||||
|
||||
// Rollback such that the transceiver is removed.
|
||||
await pc2.setLocalDescription({type:'rollback'});
|
||||
await pc2.setRemoteDescription({type:'rollback'});
|
||||
assert_equals(pc2.getTransceivers().length, 0);
|
||||
// sRD just resolved, so we're in the success task for sRD. The transition
|
||||
// from live -> ended is queued right now.
|
||||
assert_equals(pc2Transceiver.receiver.track.readyState, 'live');
|
||||
await new Promise(r => pc2Transceiver.receiver.track.onended = r);
|
||||
assert_equals(pc2Transceiver.receiver.track.readyState, 'ended');
|
||||
}, `[${kind}] Rollback when removing transceiver does end the track`);
|
||||
|
||||
@ -172,7 +179,7 @@
|
||||
const [pc2Transceiver] = pc2.getTransceivers();
|
||||
|
||||
// Rollback such that the transceiver is removed.
|
||||
await pc2.setLocalDescription({type:'rollback'});
|
||||
await pc2.setRemoteDescription({type:'rollback'});
|
||||
assert_equals(pc2.getTransceivers().length, 0);
|
||||
// The removed transceiver is stopped.
|
||||
assert_equals(pc2Transceiver.currentDirection, 'stopped',
|
||||
|
Loading…
Reference in New Issue
Block a user