blob: 4eb476dd3111e14112aa5e2175b83d0f2b5f5869 [file] [log] [blame]
This is a testharness.js-based test.
FAIL addTrack() with a track and no stream makes ontrack fire with a track and no stream. assert_equals: No remote stream created. expected 0 but got 1
PASS addTrack() with a track and a stream makes ontrack fire with a track and a stream.
PASS ontrack fires before setRemoteDescription resolves.
PASS addTrack() with two tracks and one stream makes ontrack fire twice with the tracks and shared stream.
PASS addTrack() for an existing stream makes stream.onaddtrack fire.
PASS stream.onaddtrack fires before setRemoteDescription resolves.
FAIL addTrack() with a track and two streams makes ontrack fire with a track and two streams. promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'addTrack' on 'RTCPeerConnection': Adding a track to multiple streams is not supported."
PASS ontrack's receiver matches getReceivers().
FAIL removeTrack() does not remove the receiver. assert_equals: Receiver not removed. expected 1 but got 0
PASS removeTrack() makes stream.onremovetrack fire and the track to be removed from the stream.
PASS stream.onremovetrack fires before setRemoteDescription resolves.
PASS removeTrack() makes track.onmute fire and the track to be muted.
PASS track.onmute fires before setRemoteDescription resolves.
FAIL removeTrack() twice is safe. promise_test: Unhandled rejection with value: object "InvalidAccessError: Failed to execute 'removeTrack' on 'RTCPeerConnection': The sender was not created by this peer connection."
Harness: the test ran to completion.