| 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"> | 4 <script type="text/javascript"> |
| 5 $ = function(id) { | 5 $ = function(id) { |
| 6 return document.getElementById(id); | 6 return document.getElementById(id); |
| 7 }; | 7 }; |
| 8 | 8 |
| 9 var gLocalStream = null; | 9 var gLocalStream = null; |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // Creates a MediaStream and renders it locally. When the video is detected to | 23 // Creates a MediaStream and renders it locally. When the video is detected to |
| 24 // be rolling, the title is changed and the stream should be stopped. | 24 // be rolling, the title is changed and the stream should be stopped. |
| 25 function getUserMediaAndStop(constraints) { | 25 function getUserMediaAndStop(constraints) { |
| 26 console.log('Calling getUserMediaAndStop.'); | 26 console.log('Calling getUserMediaAndStop.'); |
| 27 navigator.webkitGetUserMedia( | 27 navigator.webkitGetUserMedia( |
| 28 constraints, | 28 constraints, |
| 29 function(stream) { displayAndDetectVideo(stream, stopVideoTrack); }, | 29 function(stream) { displayAndDetectVideo(stream, stopVideoTrack); }, |
| 30 failedCallback); | 30 failedCallback); |
| 31 } | 31 } |
| 32 | 32 |
| 33 // Requests getusermedia and expects it to fail. | 33 // Requests getusermedia and expects it to fail. The error name is returned |
| 34 // to the test. |
| 34 function getUserMediaAndExpectFailure(constraints) { | 35 function getUserMediaAndExpectFailure(constraints) { |
| 35 console.log('Calling getUserMediaAndExpectFailure.'); | 36 console.log('Calling getUserMediaAndExpectFailure.'); |
| 36 navigator.webkitGetUserMedia( | 37 navigator.webkitGetUserMedia( |
| 37 constraints, | 38 constraints, |
| 38 function(stream) { failTest('Unexpectedly succeeded getUserMedia.'); }, | 39 function(stream) { failTest('Unexpectedly succeeded getUserMedia.'); }, |
| 39 function(error) { reportTestSuccess(); }); | 40 function(error) { sendValueToTest(error.name); }); |
| 40 } | 41 } |
| 41 | 42 |
| 42 // Creates a MediaStream and renders it locally. When the video is detected to | 43 // Creates a MediaStream and renders it locally. When the video is detected to |
| 43 // be rolling we return ok-stream-running through the automation controller. | 44 // be rolling we return ok-stream-running through the automation controller. |
| 44 function getUserMediaAndGetStreamUp(constraints, waitTimeInSeconds) { | 45 function getUserMediaAndGetStreamUp(constraints, waitTimeInSeconds) { |
| 45 console.log('Calling getUserMediaAndGetStreamUp.'); | 46 console.log('Calling getUserMediaAndGetStreamUp.'); |
| 46 navigator.webkitGetUserMedia( | 47 navigator.webkitGetUserMedia( |
| 47 constraints, | 48 constraints, |
| 48 function(stream) { | 49 function(stream) { |
| 49 displayAndDetectVideo( | 50 displayAndDetectVideo( |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 <tr> | 268 <tr> |
| 268 <td><video width="320" height="240" id="local-view-2" | 269 <td><video width="320" height="240" id="local-view-2" |
| 269 autoplay="autoplay"></video></td> | 270 autoplay="autoplay"></video></td> |
| 270 <!-- Canvases are named after their corresponding video elements. --> | 271 <!-- Canvases are named after their corresponding video elements. --> |
| 271 <td><canvas width="320" height="240" id="local-view-2-canvas" | 272 <td><canvas width="320" height="240" id="local-view-2-canvas" |
| 272 style="display:none"></canvas></td> | 273 style="display:none"></canvas></td> |
| 273 </tr> | 274 </tr> |
| 274 </table> | 275 </table> |
| 275 </body> | 276 </body> |
| 276 </html> | 277 </html> |
| OLD | NEW |