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

Side by Side Diff: LayoutTests/fast/mediastream/MediaStreamTrack-getSourceInfos.html

Issue 16778002: MediaStream API: Changing the device enumeration to be async (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review comment fixed Created 7 years, 6 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/MediaStreamTrack-getSourceInfos-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
(Empty)
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <link rel="stylesheet" href="../js/resources/js-test-style.css">
5 <script src="../js/resources/js-test-pre.js"></script>
6 </head>
7 <body>
8 <p id="description"></p>
9 <div id="console"></div>
10 <script>
11 description("Tests MediaStreamTrack::getSourceInfos.");
12
13 var sources = null;
14 var previousId;
15
16 function error() {
17 testFailed('Stream generation failed.');
18 finishJSTest();
19 }
20
21 function getUserMedia(constraints, callback) {
22 try {
23 navigator.webkitGetUserMedia(constraints, callback, error);
24 } catch (e) {
25 testFailed('webkitGetUserMedia threw exception :' + e);
26 finishJSTest();
27 }
28 }
29
30 function gotStream(s) {
31 shouldNotThrow('sources = MediaStreamTrack.getSourceInfos();');
32 shouldBeTrue('sources.length > 0');
33 shouldBeTrue('sources[0].id === previousId');
34 shouldBeTrue('sources[0].label.length > 0');
35 finishJSTest();
36 }
37
38 shouldNotThrow('sources = MediaStreamTrack.getSourceInfos();');
39 shouldBeTrue('sources.length > 0');
40 previousId = sources[0].id;
41
42 getUserMedia({audio:true, video:true}, gotStream);
43
44 window.jsTestIsAsync = true;
45 window.successfullyParsed = true;
46 </script>
47 <script src="../js/resources/js-test-post.js"></script>
48 </body>
49 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/mediastream/MediaStreamTrack-getSourceInfos-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698