diff --git a/webrtc/RTCRtpTransceiver.https.html b/webrtc/RTCRtpTransceiver.https.html index 472af9a7084184..2de9fb9f6ee4db 100644 --- a/webrtc/RTCRtpTransceiver.https.html +++ b/webrtc/RTCRtpTransceiver.https.html @@ -1129,70 +1129,6 @@ assert_equals(2, countUnmuteVideo2.count, "Got 2 unmute events for pc2's video track"); }; - const checkOnAddStream = async t => { - const pc1 = new RTCPeerConnection(); - t.add_cleanup(() => pc1.close()); - const stream1 = await navigator.mediaDevices.getUserMedia({audio: true, video: true}); - t.add_cleanup(() => stopTracks(stream1)); - const audio1 = stream1.getAudioTracks()[0]; - pc1.addTrack(audio1, stream1); - const video1 = stream1.getVideoTracks()[0]; - pc1.addTrack(video1, stream1); - - const pc2 = new RTCPeerConnection(); - t.add_cleanup(() => pc2.close()); - const stream2 = await navigator.mediaDevices.getUserMedia({audio: true, video: true}); - t.add_cleanup(() => stopTracks(stream2)); - const audio2 = stream2.getAudioTracks()[0]; - pc2.addTrack(audio2, stream2); - const video2 = stream2.getVideoTracks()[0]; - pc2.addTrack(video2, stream2); - - const offer = await pc1.createOffer(); - - let trackEventCollector = collectTrackEvents(pc2); - let addstreamEventCollector = collectEvents(pc2, "addstream", e => { - hasProps(e, {stream: {id: stream1.id}}); - assert_equals(e.stream.getAudioTracks().length, 1, "One audio track"); - assert_equals(e.stream.getVideoTracks().length, 1, "One video track"); - }); - - await pc2.setRemoteDescription(offer); - - let addstreamEvents = addstreamEventCollector.finish(); - assert_equals(addstreamEvents.length, 1, "Should have 1 addstream event"); - - let trackEvents = trackEventCollector.finish(); - - hasProps(trackEvents, - [ - {streams: [addstreamEvents[0].stream]}, - {streams: [addstreamEvents[0].stream]} - ]); - - await pc1.setLocalDescription(offer); - const answer = await pc2.createAnswer(); - - trackEventCollector = collectTrackEvents(pc1); - addstreamEventCollector = collectEvents(pc1, "addstream", e => { - hasProps(e, {stream: {id: stream2.id}}); - assert_equals(e.stream.getAudioTracks().length, 1, "One audio track"); - assert_equals(e.stream.getVideoTracks().length, 1, "One video track"); - }); - - await pc1.setRemoteDescription(answer); - addstreamEvents = addstreamEventCollector.finish(); - assert_equals(addstreamEvents.length, 1, "Should have 1 addstream event"); - - trackEvents = trackEventCollector.finish(); - - hasProps(trackEvents, - [ - {streams: [addstreamEvents[0].stream]}, - {streams: [addstreamEvents[0].stream]} - ]); - }; - const checkStop = async t => { const pc1 = new RTCPeerConnection(); t.add_cleanup(() => pc1.close()); @@ -2211,7 +2147,6 @@ checkAddTrackExistingTransceiverThenRemove, checkRemoveTrackNegotiation, checkMute, - checkOnAddStream, checkStop, checkStopAfterCreateOffer, checkStopAfterSetLocalOffer, diff --git a/webrtc/legacy/onaddstream.https.html b/webrtc/legacy/onaddstream.https.html new file mode 100644 index 00000000000000..5aa16b36a24e1b --- /dev/null +++ b/webrtc/legacy/onaddstream.https.html @@ -0,0 +1,153 @@ + + +