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

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

Issue 214663004: Add test for sending square resolution video on a PeerConnection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nit. Created 6 years, 8 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
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 // Test that we can setup call with an audio and video track. 57 // Test that we can setup call with an audio and video track.
58 function call(constraints) { 58 function call(constraints) {
59 createConnections(null); 59 createConnections(null);
60 navigator.webkitGetUserMedia(constraints, 60 navigator.webkitGetUserMedia(constraints,
61 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); 61 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError);
62 waitForVideo('remote-view-1'); 62 waitForVideo('remote-view-1');
63 waitForVideo('remote-view-2'); 63 waitForVideo('remote-view-2');
64 } 64 }
65 65
66 // Test that we can setup call with an audio and video track and check that
67 // the video resolution is as expected.
68 function callAndExpectResolution(constraints,
69 expected_width,
70 expected_height) {
71 createConnections(null);
72 navigator.webkitGetUserMedia(constraints,
73 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError);
74 waitForVideoWithResolution('remote-view-1',
75 expected_width,
76 expected_height);
77 waitForVideoWithResolution('remote-view-2',
78 expected_width,
79 expected_height);
80 }
81
82
66 // First calls without streams on any connections, and then adds a stream 83 // First calls without streams on any connections, and then adds a stream
67 // to peer connection 1 which gets sent to peer connection 2. We must wait 84 // to peer connection 1 which gets sent to peer connection 2. We must wait
68 // for the first negotiation to complete before starting the second one, which 85 // for the first negotiation to complete before starting the second one, which
69 // is why we wait until the connection is stable before re-negotiating. 86 // is why we wait until the connection is stable before re-negotiating.
70 function callEmptyThenAddOneStreamAndRenegotiate(constraints) { 87 function callEmptyThenAddOneStreamAndRenegotiate(constraints) {
71 createConnections(null); 88 createConnections(null);
72 negotiate(); 89 negotiate();
73 waitForConnectionToStabilize(gFirstConnection, function() { 90 waitForConnectionToStabilize(gFirstConnection, function() {
74 navigator.webkitGetUserMedia(constraints, 91 navigator.webkitGetUserMedia(constraints,
75 addStreamToTheFirstConnectionAndNegotiate, printGetUserMediaError); 92 addStreamToTheFirstConnectionAndNegotiate, printGetUserMediaError);
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 <td><canvas width="320" height="240" id="remote-view-2-canvas" 857 <td><canvas width="320" height="240" id="remote-view-2-canvas"
841 style="display:none"></canvas></td> 858 style="display:none"></canvas></td>
842 <td><canvas width="320" height="240" id="remote-view-3-canvas" 859 <td><canvas width="320" height="240" id="remote-view-3-canvas"
843 style="display:none"></canvas></td> 860 style="display:none"></canvas></td>
844 <td><canvas width="320" height="240" id="remote-view-4-canvas" 861 <td><canvas width="320" height="240" id="remote-view-4-canvas"
845 style="display:none"></canvas></td> 862 style="display:none"></canvas></td>
846 </tr> 863 </tr>
847 </table> 864 </table>
848 </body> 865 </body>
849 </html> 866 </html>
OLDNEW
« no previous file with comments | « content/browser/media/webrtc_browsertest.cc ('k') | content/test/data/media/webrtc_test_utilities.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698