Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: content/test/data/media/peerconnection-call.html

Issue 417203002: Add browser test to connect chormium sink to remote tracks, verify that no crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/media/webrtc_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script type="text/javascript" src="webrtc_test_utilities.js"></script> 3 <script type="text/javascript" src="webrtc_test_utilities.js"></script>
4 <script type="text/javascript" src="webrtc_test_audio.js"></script> 4 <script type="text/javascript" src="webrtc_test_audio.js"></script>
5 <script type="text/javascript"> 5 <script type="text/javascript">
6 $ = function(id) { 6 $ = function(id) {
7 return document.getElementById(id); 7 return document.getElementById(id);
8 }; 8 };
9 9
10 var gFirstConnection = null; 10 var gFirstConnection = null;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 waitForVideo('remote-view-3'); 130 waitForVideo('remote-view-3');
131 waitForVideo('remote-view-4'); 131 waitForVideo('remote-view-4');
132 } 132 }
133 133
134 // Do the forwarding after we have received video. 134 // Do the forwarding after we have received video.
135 detectVideoPlaying('remote-view-1', onRemoteStream1); 135 detectVideoPlaying('remote-view-1', onRemoteStream1);
136 detectVideoPlaying('remote-view-2', onRemoteStream2); 136 detectVideoPlaying('remote-view-2', onRemoteStream2);
137 } 137 }
138 138
139 // First makes a call between pc1 and pc2, and then construct a new media
140 // stream using the remote audio and video tracks, connect the new media
141 // stream to a video element. These operations should not crash Chrome.
142 function ConnectChromiumSinkToRemoteAudioTrack() {
143 createConnections(null);
144 navigator.webkitGetUserMedia({audio: true, video: true},
145 addStreamToBothConnectionsAndNegotiate,
146 printGetUserMediaError);
147
148 detectVideoPlaying('remote-view-2', function() {
149 // Construct a new media stream with remote tracks.
150 var newStream = new webkitMediaStream();
151 newStream.addTrack(
152 gSecondConnection.getRemoteStreams()[0].getAudioTracks()[0]);
153 newStream.addTrack(
154 gSecondConnection.getRemoteStreams()[0].getVideoTracks()[0]);
155 var videoElement = document.createElement('video');
156
157 // No crash for this operation.
158 videoElement.src = URL.createObjectURL(newStream);
159 waitForVideo('remote-view-2');
160 });
161 }
162
139 // Test that we can setup call with an audio and video track and 163 // Test that we can setup call with an audio and video track and
140 // simulate that the remote peer don't support MSID. 164 // simulate that the remote peer don't support MSID.
141 function callWithoutMsidAndBundle() { 165 function callWithoutMsidAndBundle() {
142 createConnections(null); 166 createConnections(null);
143 transformSdp = removeBundle; 167 transformSdp = removeBundle;
144 transformRemoteSdp = removeMsid; 168 transformRemoteSdp = removeMsid;
145 gTestWithoutMsid = true; 169 gTestWithoutMsid = true;
146 navigator.webkitGetUserMedia({audio: true, video: true}, 170 navigator.webkitGetUserMedia({audio: true, video: true},
147 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); 171 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError);
148 waitForVideo('remote-view-1'); 172 waitForVideo('remote-view-1');
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 <td><canvas width="320" height="240" id="remote-view-2-canvas" 872 <td><canvas width="320" height="240" id="remote-view-2-canvas"
849 style="display:none"></canvas></td> 873 style="display:none"></canvas></td>
850 <td><canvas width="320" height="240" id="remote-view-3-canvas" 874 <td><canvas width="320" height="240" id="remote-view-3-canvas"
851 style="display:none"></canvas></td> 875 style="display:none"></canvas></td>
852 <td><canvas width="320" height="240" id="remote-view-4-canvas" 876 <td><canvas width="320" height="240" id="remote-view-4-canvas"
853 style="display:none"></canvas></td> 877 style="display:none"></canvas></td>
854 </tr> 878 </tr>
855 </table> 879 </table>
856 </body> 880 </body>
857 </html> 881 </html>
OLDNEW
« no previous file with comments | « content/browser/media/webrtc_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698