| 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_common.js"></script> | 4 <script type="text/javascript" src="webrtc_test_common.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 window.onerror = function(errorMsg, url, lineNumber, column, errorObj) { | 10 window.onerror = function(errorMsg, url, lineNumber, column, errorObj) { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 // Test that we can setup a call with an audio and video track (must request | 26 // Test that we can setup a call with an audio and video track (must request |
| 27 // video in this call since we expect video to be playing). | 27 // video in this call since we expect video to be playing). |
| 28 function call(constraints) { | 28 function call(constraints) { |
| 29 createConnections(null); | 29 createConnections(null); |
| 30 navigator.webkitGetUserMedia(constraints, | 30 navigator.webkitGetUserMedia(constraints, |
| 31 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); | 31 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); |
| 32 waitForVideo('remote-view-1'); | 32 waitForVideo('remote-view-1'); |
| 33 waitForVideo('remote-view-2'); | 33 waitForVideo('remote-view-2'); |
| 34 } | 34 } |
| 35 | 35 |
| 36 // Hang up a call. |
| 37 function hangup() { |
| 38 gFirstConnection.close(); |
| 39 gSecondConnection.close(); |
| 40 gFirstConnection = null; |
| 41 gSecondConnection = null; |
| 42 |
| 43 gLocalStream.getTracks().forEach(function(track) { |
| 44 track.stop(); |
| 45 }); |
| 46 gLocalStream = null; |
| 47 |
| 48 sendValueToTest('OK'); |
| 49 } |
| 50 |
| 36 // Test that we can setup a call with a video track and that the remote peer | 51 // Test that we can setup a call with a video track and that the remote peer |
| 37 // receives black frames if the local video track is disabled. | 52 // receives black frames if the local video track is disabled. |
| 38 function callAndDisableLocalVideo(constraints) { | 53 function callAndDisableLocalVideo(constraints) { |
| 39 createConnections(null); | 54 createConnections(null); |
| 40 navigator.webkitGetUserMedia(constraints, | 55 navigator.webkitGetUserMedia(constraints, |
| 41 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); | 56 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); |
| 42 detectVideoPlaying('remote-view-1', | 57 detectVideoPlaying('remote-view-1', |
| 43 function () { | 58 function () { |
| 44 assertEquals(gLocalStream.getVideoTracks().length, 1); | 59 assertEquals(gLocalStream.getVideoTracks().length, 1); |
| 45 gLocalStream.getVideoTracks()[0].enabled = false; | 60 gLocalStream.getVideoTracks()[0].enabled = false; |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 <td><canvas width="320" height="240" id="remote-view-2-canvas" | 635 <td><canvas width="320" height="240" id="remote-view-2-canvas" |
| 621 style="display:none"></canvas></td> | 636 style="display:none"></canvas></td> |
| 622 <td><canvas width="320" height="240" id="remote-view-3-canvas" | 637 <td><canvas width="320" height="240" id="remote-view-3-canvas" |
| 623 style="display:none"></canvas></td> | 638 style="display:none"></canvas></td> |
| 624 <td><canvas width="320" height="240" id="remote-view-4-canvas" | 639 <td><canvas width="320" height="240" id="remote-view-4-canvas" |
| 625 style="display:none"></canvas></td> | 640 style="display:none"></canvas></td> |
| 626 </tr> | 641 </tr> |
| 627 </table> | 642 </table> |
| 628 </body> | 643 </body> |
| 629 </html> | 644 </html> |
| OLD | NEW |