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

Side by Side Diff: LayoutTests/fast/mediastream/argument-types.html

Issue 173893009: MediaStream API: Update getUserMedia to match the spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed review comment Created 6 years, 10 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 | « no previous file | LayoutTests/fast/mediastream/argument-types-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <script src="script-tests/argument-types.js"></script> 7 <script>
8 description("Tests the acceptable types for arguments to navigator.getUserMedia methods.");
9
10 var emptyFunction = function() {};
11
12 // No arguments
13 shouldThrow('navigator.webkitGetUserMedia()');
14
15 // 1/2 arguments (getUserMedia requires at least 3 arguments).
16 shouldThrow('navigator.webkitGetUserMedia({video: true})');
17 shouldThrow('navigator.webkitGetUserMedia({video: true}, emptyFunction)');
18
19 // 3 arguments (getUserMedia requires at least 3 arguments).
20 shouldNotThrow('navigator.webkitGetUserMedia({video: true}, emptyFunction, empty Function)');
21 shouldNotThrow('navigator.webkitGetUserMedia({audio: true}, emptyFunction, empty Function)');
22 shouldNotThrow('navigator.webkitGetUserMedia({audio: true, video: true}, emptyFu nction, emptyFunction)');
23 shouldThrow('navigator.webkitGetUserMedia(-Infinity, emptyFunction, emptyFunctio n)');
24 shouldThrow('navigator.webkitGetUserMedia(42, emptyFunction, emptyFunction)');
25 shouldThrow('navigator.webkitGetUserMedia(Infinity, emptyFunction, emptyFunction )');
26 shouldThrow('navigator.webkitGetUserMedia(emptyFunction, emptyFunction, emptyFun ction)');
27 shouldThrow('navigator.webkitGetUserMedia(null, emptyFunction, emptyFunction)');
28 shouldThrow('navigator.webkitGetUserMedia(true, emptyFunction, emptyFunction)');
29 shouldThrow('navigator.webkitGetUserMedia(undefined, emptyFunction, emptyFunctio n)');
30 shouldThrow('navigator.webkitGetUserMedia({ }, emptyFunction, emptyFunction)');
31 shouldThrow('navigator.webkitGetUserMedia({foo: true }, emptyFunction, emptyFunc tion)');
32 shouldThrow('navigator.webkitGetUserMedia({audio:true, video:true}, emptyFunctio n, undefined)');
33 shouldThrow('navigator.webkitGetUserMedia({video: true}, "foobar", emptyFunction )');
34 shouldThrow('navigator.webkitGetUserMedia({video: true}, -Infinity, emptyFunctio n)');
35 shouldThrow('navigator.webkitGetUserMedia({video: true}, 42, emptyFunction)');
36 shouldThrow('navigator.webkitGetUserMedia({video: true}, Infinity, emptyFunction )');
37 shouldThrow('navigator.webkitGetUserMedia({video: true}, emptyFunction, "video") ');
38 shouldThrow('navigator.webkitGetUserMedia({video: true}, emptyFunction, -Infinit y)');
39 shouldThrow('navigator.webkitGetUserMedia({video: true}, emptyFunction, 42)');
40 shouldThrow('navigator.webkitGetUserMedia({video: true}, emptyFunction, Infinity )');
41 shouldThrow('navigator.webkitGetUserMedia({video: true}, emptyFunction, null)');
42 shouldThrow('navigator.webkitGetUserMedia({video: true}, emptyFunction, true)');
43 shouldThrow('navigator.webkitGetUserMedia({video: true}, emptyFunction, undefine d)');
44 shouldThrow('navigator.webkitGetUserMedia({video: true}, emptyFunction, {})');
45 shouldThrow('navigator.webkitGetUserMedia({video: true}, null, emptyFunction)');
46 shouldThrow('navigator.webkitGetUserMedia({video: true}, true, emptyFunction)');
47 shouldThrow('navigator.webkitGetUserMedia({video: true}, undefined, emptyFunctio n)');
48 shouldThrow('navigator.webkitGetUserMedia({video: true}, {}, emptyFunction)');
49
50 window.jsTestIsAsync = false;
51 </script>
8 </body> 52 </body>
9 </html> 53 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/mediastream/argument-types-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698