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

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

Issue 197213004: Fix DCHECK error when invalid video constraints are set on gUM. If a video constraint can not be me… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix to use error code and use expect failure. Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/media/media_stream_video_capturer_source.cc ('k') | 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 var gLocalStream = null; 9 var gLocalStream = null;
10 10
(...skipping 12 matching lines...) Expand all
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.
phoglund_chromium 2014/03/14 15:26:10 Nit: comment that it returns the error name.
34 function getUserMediaAndExpectFailure(constraints) { 34 function getUserMediaAndExpectFailure(constraints) {
35 console.log('Calling getUserMediaAndExpectFailure.'); 35 console.log('Calling getUserMediaAndExpectFailure.');
36 navigator.webkitGetUserMedia( 36 navigator.webkitGetUserMedia(
37 constraints, 37 constraints,
38 function(stream) { failTest('Unexpectedly succeeded getUserMedia.'); }, 38 function(stream) { failTest('Unexpectedly succeeded getUserMedia.'); },
39 function(error) { reportTestSuccess(); }); 39 function(error) { sendValueToTest(error.name); });
40 } 40 }
41 41
42 // Creates a MediaStream and renders it locally. When the video is detected to 42 // 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. 43 // be rolling we return ok-stream-running through the automation controller.
44 function getUserMediaAndGetStreamUp(constraints, waitTimeInSeconds) { 44 function getUserMediaAndGetStreamUp(constraints, waitTimeInSeconds) {
45 console.log('Calling getUserMediaAndGetStreamUp.'); 45 console.log('Calling getUserMediaAndGetStreamUp.');
46 navigator.webkitGetUserMedia( 46 navigator.webkitGetUserMedia(
47 constraints, 47 constraints,
48 function(stream) { 48 function(stream) {
49 displayAndDetectVideo( 49 displayAndDetectVideo(
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 <tr> 267 <tr>
268 <td><video width="320" height="240" id="local-view-2" 268 <td><video width="320" height="240" id="local-view-2"
269 autoplay="autoplay"></video></td> 269 autoplay="autoplay"></video></td>
270 <!-- Canvases are named after their corresponding video elements. --> 270 <!-- Canvases are named after their corresponding video elements. -->
271 <td><canvas width="320" height="240" id="local-view-2-canvas" 271 <td><canvas width="320" height="240" id="local-view-2-canvas"
272 style="display:none"></canvas></td> 272 style="display:none"></canvas></td>
273 </tr> 273 </tr>
274 </table> 274 </table>
275 </body> 275 </body>
276 </html> 276 </html>
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_video_capturer_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698