| 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 setAllEventsOccuredHandler(function() { | 9 setAllEventsOccuredHandler(function() { |
| 10 reportTestSuccess(); | 10 reportTestSuccess(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 constraints, | 35 constraints, |
| 36 function(stream) { | 36 function(stream) { |
| 37 detectVideoInLocalView1(stream, function() { | 37 detectVideoInLocalView1(stream, function() { |
| 38 stream.getVideoTracks()[0].stop(); | 38 stream.getVideoTracks()[0].stop(); |
| 39 waitForVideoToStop('local-view-1'); | 39 waitForVideoToStop('local-view-1'); |
| 40 }); | 40 }); |
| 41 }, | 41 }, |
| 42 failedCallback); | 42 failedCallback); |
| 43 } | 43 } |
| 44 | 44 |
| 45 // Requests getusermedia and expects it to succeed. |
| 46 function getUserMediaAndExpectSuccess(constraints) { |
| 47 console.log('Calling getUserMediaAndExpectSuccess.'); |
| 48 navigator.webkitGetUserMedia( |
| 49 constraints, |
| 50 reportTestSuccess, |
| 51 failedCallback); |
| 52 } |
| 53 |
| 45 // Requests getusermedia and expects it to fail. The error name is returned | 54 // Requests getusermedia and expects it to fail. The error name is returned |
| 46 // to the test. | 55 // to the test. |
| 47 function getUserMediaAndExpectFailure(constraints) { | 56 function getUserMediaAndExpectFailure(constraints) { |
| 48 console.log('Calling getUserMediaAndExpectFailure.'); | 57 console.log('Calling getUserMediaAndExpectFailure.'); |
| 49 navigator.webkitGetUserMedia( | 58 navigator.webkitGetUserMedia( |
| 50 constraints, | 59 constraints, |
| 51 function(stream) { failTest('Unexpectedly succeeded getUserMedia.'); }, | 60 function(stream) { failTest('Unexpectedly succeeded getUserMedia.'); }, |
| 52 function(error) { sendValueToTest(error.name); }); | 61 function(error) { sendValueToTest(error.name); }); |
| 53 } | 62 } |
| 54 | 63 |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 </tr> | 540 </tr> |
| 532 <tr> | 541 <tr> |
| 533 <td><video id="local-view-2" width="320" height="240" autoplay | 542 <td><video id="local-view-2" width="320" height="240" autoplay |
| 534 style="display:none"></video></td> | 543 style="display:none"></video></td> |
| 535 <td><canvas id="local-view-2-canvas" width="320" height="240" | 544 <td><canvas id="local-view-2-canvas" width="320" height="240" |
| 536 style="display:none"></canvas></td> | 545 style="display:none"></canvas></td> |
| 537 </tr> | 546 </tr> |
| 538 </table> | 547 </table> |
| 539 </body> | 548 </body> |
| 540 </html> | 549 </html> |
| OLD | NEW |