Index: content/test/data/media/peerconnection-call.html |
diff --git a/content/test/data/media/peerconnection-call.html b/content/test/data/media/peerconnection-call.html |
index 7581b729947e8f3370b4d4aa4652e232c6090185..02123e55af2e68fc92c5c5419fac683eff8e2aef 100644 |
--- a/content/test/data/media/peerconnection-call.html |
+++ b/content/test/data/media/peerconnection-call.html |
@@ -109,6 +109,16 @@ |
// Do the DTMF test after we have received video. |
detectVideoIn('remote-view-2', onCallEstablished); |
} |
+ |
+ // Test call with a new Video MediaStream that has been created based on a |
+ // stream generated by getUserMedia. |
+ function callWithNewVideoMediaStream() { |
+ createConnections(null); |
+ navigator.webkitGetUserMedia({audio:true, video:true}, |
+ createNewVideoStreamAndAddToBothConnections, printGetUserMediaError); |
+ waitForVideo('remote-view-1'); |
+ waitForVideo('remote-view-2'); |
+ } |
// This function is used for setting up a test that: |
// 1. Creates a data channel on |gFirstConnection| and sends data to |
@@ -156,6 +166,7 @@ |
} |
} |
} |
+ |
function onToneChange(tone) { |
gSentTones += tone.tone; |
@@ -203,6 +214,16 @@ |
gFirstConnection.addStream(localStream); |
negotiate(); |
} |
+ |
+ // Called if getUserMedia succeeds when we want to send a modified |
+ // MediaStream. A new MediaStream is created and the video track from |
+ // |localStream| is added. |
+ function createNewVideoStreamAndAddToBothConnections(localStream) { |
+ var new_stream = new webkitMediaStream(localStream.getAudioTracks()); |
+ new_stream.addTrack(localStream.getVideoTracks()[0]); |
+ new_stream.removeTrack(new_stream.getAudioTracks()[0]); |
+ addStreamToBothConnectionsAndNegotiate(new_stream); |
+ } |
function negotiate() { |
gFirstConnection.createOffer(onOfferCreated); |