Commit c8bfa0b2 authored by Harald Alvestrand's avatar Harald Alvestrand Committed by Commit Bot

Test that stopped transceivers don't prevent offer/answer

Bug: chromium:1127625
Change-Id: I9ac8b6b90f241460ade299914369405363a36403
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2410407
Commit-Queue: Harald Alvestrand <hta@chromium.org>
Reviewed-by: default avatarPhilipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#807790}
parent be1c2a40
...@@ -3,5 +3,7 @@ PASS A transceiver added and stopped before the initial offer generation should ...@@ -3,5 +3,7 @@ PASS A transceiver added and stopped before the initial offer generation should
PASS During renegotiation, adding and stopping a transceiver should not trigger a renegotiated offer m-section generation PASS During renegotiation, adding and stopping a transceiver should not trigger a renegotiated offer m-section generation
FAIL A stopped sendonly transceiver should generate a sendonly m-section in the offer assert_true: The audio m-section should be sendonly expected true got false FAIL A stopped sendonly transceiver should generate a sendonly m-section in the offer assert_true: The audio m-section should be sendonly expected true got false
PASS A stopped inactive transceiver should generate an inactive m-section in the offer PASS A stopped inactive transceiver should generate an inactive m-section in the offer
PASS If a track is stopped locally, setting a locally generated answer should still work
PASS If a track is stopped remotely, setting a locally generated answer should still work
Harness: the test ran to completion. Harness: the test ran to completion.
...@@ -79,4 +79,29 @@ promise_test(async (t)=> { ...@@ -79,4 +79,29 @@ promise_test(async (t)=> {
assert_true(offer.sdp.includes("a=inactive"), "The audio m-section should be inactive"); assert_true(offer.sdp.includes("a=inactive"), "The audio m-section should be inactive");
}, "A stopped inactive transceiver should generate an inactive m-section in the offer"); }, "A stopped inactive transceiver should generate an inactive m-section in the offer");
promise_test(async (t) => {
const pc1 = new RTCPeerConnection();
const pc2 = new RTCPeerConnection();
t.add_cleanup(() => pc1.close());
t.add_cleanup(() => pc2.close());
pc1.addTransceiver("audio");
await exchangeOfferAnswer(pc1, pc2);
pc1.getTransceivers()[0].stop();
await exchangeOfferAnswer(pc1, pc2);
await pc1.setLocalDescription(await pc1.createOffer());
}, 'If a track is stopped locally, setting a locally generated answer should still work');
promise_test(async (t) => {
const pc1 = new RTCPeerConnection();
const pc2 = new RTCPeerConnection();
t.add_cleanup(() => pc1.close());
t.add_cleanup(() => pc2.close());
pc1.addTransceiver("audio");
await exchangeOfferAnswer(pc1, pc2);
pc2.getTransceivers()[0].stop();
await exchangeOfferAnswer(pc2, pc1);
await pc1.setLocalDescription(await pc1.createOffer());
}, 'If a track is stopped remotely, setting a locally generated answer should still work');
</script> </script>
...@@ -3,5 +3,7 @@ FAIL A transceiver added and stopped before the initial offer generation should ...@@ -3,5 +3,7 @@ FAIL A transceiver added and stopped before the initial offer generation should
FAIL During renegotiation, adding and stopping a transceiver should not trigger a renegotiated offer m-section generation promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to execute 'addTransceiver' on 'RTCPeerConnection': This operation is only supported in 'unified-plan'." FAIL During renegotiation, adding and stopping a transceiver should not trigger a renegotiated offer m-section generation promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to execute 'addTransceiver' on 'RTCPeerConnection': This operation is only supported in 'unified-plan'."
FAIL A stopped sendonly transceiver should generate a sendonly m-section in the offer promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to execute 'addTransceiver' on 'RTCPeerConnection': This operation is only supported in 'unified-plan'." FAIL A stopped sendonly transceiver should generate a sendonly m-section in the offer promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to execute 'addTransceiver' on 'RTCPeerConnection': This operation is only supported in 'unified-plan'."
FAIL A stopped inactive transceiver should generate an inactive m-section in the offer promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to execute 'addTransceiver' on 'RTCPeerConnection': This operation is only supported in 'unified-plan'." FAIL A stopped inactive transceiver should generate an inactive m-section in the offer promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to execute 'addTransceiver' on 'RTCPeerConnection': This operation is only supported in 'unified-plan'."
FAIL If a track is stopped locally, setting a locally generated answer should still work promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to execute 'addTransceiver' on 'RTCPeerConnection': This operation is only supported in 'unified-plan'."
FAIL If a track is stopped remotely, setting a locally generated answer should still work promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to execute 'addTransceiver' on 'RTCPeerConnection': This operation is only supported in 'unified-plan'."
Harness: the test ran to completion. Harness: the test ran to completion.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment