OLD | NEW |
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 // Test that we can setup call with an audio and video track. | 52 // Test that we can setup call with an audio and video track. |
53 function call(constraints) { | 53 function call(constraints) { |
54 createConnections(null); | 54 createConnections(null); |
55 navigator.webkitGetUserMedia(constraints, | 55 navigator.webkitGetUserMedia(constraints, |
56 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); | 56 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); |
57 waitForVideo('remote-view-1'); | 57 waitForVideo('remote-view-1'); |
58 waitForVideo('remote-view-2'); | 58 waitForVideo('remote-view-2'); |
59 } | 59 } |
60 | 60 |
61 // Test that we can setup a call with a video track and that the remote peer | |
62 // receives black frames if the local video track is disabled. | |
63 function callAndDisableLocalVideo(constraints) { | |
64 createConnections(null); | |
65 navigator.webkitGetUserMedia(constraints, | |
66 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); | |
67 detectVideoPlaying('remote-view-1', | |
68 function () { | |
69 assertEquals(gLocalStream.getVideoTracks().length, 1); | |
70 gLocalStream.getVideoTracks()[0].enabled = false; | |
71 waitForBlackVideo('remote-view-1'); | |
72 }); | |
73 } | |
74 | |
75 // Test that we can setup call with an audio and video track and check that | 61 // Test that we can setup call with an audio and video track and check that |
76 // the video resolution is as expected. | 62 // the video resolution is as expected. |
77 function callAndExpectResolution(constraints, | 63 function callAndExpectResolution(constraints, |
78 expected_width, | 64 expected_width, |
79 expected_height) { | 65 expected_height) { |
80 createConnections(null); | 66 createConnections(null); |
81 navigator.webkitGetUserMedia(constraints, | 67 navigator.webkitGetUserMedia(constraints, |
82 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); | 68 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); |
83 waitForVideoWithResolution('remote-view-1', | 69 waitForVideoWithResolution('remote-view-1', |
84 expected_width, | 70 expected_width, |
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 <td><canvas width="320" height="240" id="remote-view-2-canvas" | 890 <td><canvas width="320" height="240" id="remote-view-2-canvas" |
905 style="display:none"></canvas></td> | 891 style="display:none"></canvas></td> |
906 <td><canvas width="320" height="240" id="remote-view-3-canvas" | 892 <td><canvas width="320" height="240" id="remote-view-3-canvas" |
907 style="display:none"></canvas></td> | 893 style="display:none"></canvas></td> |
908 <td><canvas width="320" height="240" id="remote-view-4-canvas" | 894 <td><canvas width="320" height="240" id="remote-view-4-canvas" |
909 style="display:none"></canvas></td> | 895 style="display:none"></canvas></td> |
910 </tr> | 896 </tr> |
911 </table> | 897 </table> |
912 </body> | 898 </body> |
913 </html> | 899 </html> |
OLD | NEW |