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 |
61 // Test that we can setup call with an audio and video track and check that | 75 // Test that we can setup call with an audio and video track and check that |
62 // the video resolution is as expected. | 76 // the video resolution is as expected. |
63 function callAndExpectResolution(constraints, | 77 function callAndExpectResolution(constraints, |
64 expected_width, | 78 expected_width, |
65 expected_height) { | 79 expected_height) { |
66 createConnections(null); | 80 createConnections(null); |
67 navigator.webkitGetUserMedia(constraints, | 81 navigator.webkitGetUserMedia(constraints, |
68 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); | 82 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); |
69 waitForVideoWithResolution('remote-view-1', | 83 waitForVideoWithResolution('remote-view-1', |
70 expected_width, | 84 expected_width, |
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 <td><canvas width="320" height="240" id="remote-view-2-canvas" | 904 <td><canvas width="320" height="240" id="remote-view-2-canvas" |
891 style="display:none"></canvas></td> | 905 style="display:none"></canvas></td> |
892 <td><canvas width="320" height="240" id="remote-view-3-canvas" | 906 <td><canvas width="320" height="240" id="remote-view-3-canvas" |
893 style="display:none"></canvas></td> | 907 style="display:none"></canvas></td> |
894 <td><canvas width="320" height="240" id="remote-view-4-canvas" | 908 <td><canvas width="320" height="240" id="remote-view-4-canvas" |
895 style="display:none"></canvas></td> | 909 style="display:none"></canvas></td> |
896 </tr> | 910 </tr> |
897 </table> | 911 </table> |
898 </body> | 912 </body> |
899 </html> | 913 </html> |
OLD | NEW |