Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1240)

Side by Side Diff: content/test/data/media/getusermedia.html

Issue 811653007: Fixes WebRTC browsertests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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();
11 }); 11 });
12 12
13 function getSources() { 13 function getSources() {
14 MediaStreamTrack.getSources(function(devices) { 14 MediaStreamTrack.getSources(function(devices) {
15 document.title = 'Media devices available'; 15 document.title = 'Media devices available';
16 sendValueToTest(JSON.stringify(devices)); 16 var results = [];
17 for (var device, i = 0; device = devices[i]; ++i) {
18 results.push({
19 'id': device.id,
20 'kind': device.kind,
21 'label': device.label,
22 'facing': device.facing
23 });
24 }
25 sendValueToTest(JSON.stringify(results));
17 }); 26 });
18 } 27 }
19 28
20 // Creates a MediaStream and renders it locally. When the video is detected to 29 // Creates a MediaStream and renders it locally. When the video is detected to
21 // be rolling, the stream should be stopped. 30 // be rolling, the stream should be stopped.
22 function getUserMediaAndStop(constraints) { 31 function getUserMediaAndStop(constraints) {
23 console.log('Calling getUserMediaAndStop.'); 32 console.log('Calling getUserMediaAndStop.');
24 navigator.webkitGetUserMedia( 33 navigator.webkitGetUserMedia(
25 constraints, 34 constraints,
26 function(stream) { 35 function(stream) {
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 </tr> 472 </tr>
464 <tr> 473 <tr>
465 <td><video id="local-view-2" width="320" height="240" autoplay 474 <td><video id="local-view-2" width="320" height="240" autoplay
466 style="display:none"></video></td> 475 style="display:none"></video></td>
467 <td><canvas id="local-view-2-canvas" width="320" height="240" 476 <td><canvas id="local-view-2-canvas" width="320" height="240"
468 style="display:none"></canvas></td> 477 style="display:none"></canvas></td>
469 </tr> 478 </tr>
470 </table> 479 </table>
471 </body> 480 </body>
472 </html> 481 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698