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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 'inline:NzB4d1BINUAvLEw6UzF3WSJ+PSdFcGdUJShpX1Zj' | 48 'inline:NzB4d1BINUAvLEw6UzF3WSJ+PSdFcGdUJShpX1Zj' |
49 }; | 49 }; |
50 | 50 |
51 // When using GICE, the ICE credentials can be chosen by javascript. | 51 // When using GICE, the ICE credentials can be chosen by javascript. |
52 var EXTERNAL_GICE_UFRAG = '1234567890123456'; | 52 var EXTERNAL_GICE_UFRAG = '1234567890123456'; |
53 var EXTERNAL_GICE_PWD = '123456789012345678901234'; | 53 var EXTERNAL_GICE_PWD = '123456789012345678901234'; |
54 | 54 |
55 setAllEventsOccuredHandler(reportTestSuccess); | 55 setAllEventsOccuredHandler(reportTestSuccess); |
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, expected_width, expected_height) { |
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 waitForVideoAndExpectResolution('remote-view-1', |
phoglund_chromium
2014/03/28 08:33:30
You can shorten this to waitForVideoWithResolution
perkj_chrome
2014/03/28 09:14:23
Done.
| |
63 waitForVideo('remote-view-2'); | 63 expected_width, |
64 expected_height); | |
65 waitForVideoAndExpectResolution('remote-view-2', | |
66 expected_width, | |
67 expected_height); | |
64 } | 68 } |
65 | 69 |
66 // First calls without streams on any connections, and then adds a stream | 70 // 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 | 71 // 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 | 72 // 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. | 73 // is why we wait until the connection is stable before re-negotiating. |
70 function callEmptyThenAddOneStreamAndRenegotiate(constraints) { | 74 function callEmptyThenAddOneStreamAndRenegotiate(constraints) { |
71 createConnections(null); | 75 createConnections(null); |
72 negotiate(); | 76 negotiate(); |
73 waitForConnectionToStabilize(gFirstConnection, function() { | 77 waitForConnectionToStabilize(gFirstConnection, function() { |
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
840 <td><canvas width="320" height="240" id="remote-view-2-canvas" | 844 <td><canvas width="320" height="240" id="remote-view-2-canvas" |
841 style="display:none"></canvas></td> | 845 style="display:none"></canvas></td> |
842 <td><canvas width="320" height="240" id="remote-view-3-canvas" | 846 <td><canvas width="320" height="240" id="remote-view-3-canvas" |
843 style="display:none"></canvas></td> | 847 style="display:none"></canvas></td> |
844 <td><canvas width="320" height="240" id="remote-view-4-canvas" | 848 <td><canvas width="320" height="240" id="remote-view-4-canvas" |
845 style="display:none"></canvas></td> | 849 style="display:none"></canvas></td> |
846 </tr> | 850 </tr> |
847 </table> | 851 </table> |
848 </body> | 852 </body> |
849 </html> | 853 </html> |
OLD | NEW |