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

Side by Side Diff: LayoutTests/fast/mediastream/getMediaDevices.html

Issue 145583015: MediaStream API: Implement Navigator.getMediaDevices Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed review comments and added a simple test 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
« no previous file with comments | « no previous file | LayoutTests/fast/mediastream/getMediaDevices-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> 7 <script>
8 description("Tests the RTCPeerConnection states."); 8 description("Tests navigator.getMediaDevices");
9 9
10 var pc = null; 10 var devices = null;
11 11
12 function stateChanged() 12 function devicesCallback(d) {
13 { 13 devices = d;
14 testPassed("stateChanged was called"); 14 testPassed('Devices returned.');
15 shouldBeEqualToString('pc.signalingState', 'closed'); 15 shouldBe('devices.length', '3');
16 shouldBeEqualToString('devices[0].kind', 'audioinput');
17 shouldBeEqualToString('devices[1].kind', 'audiooutput');
18 shouldBeEqualToString('devices[2].kind', 'videoinput');
16 finishJSTest(); 19 finishJSTest();
17 } 20 }
18 21
19 shouldNotThrow('pc = new webkitRTCPeerConnection({iceServers:[]}, null);'); 22 shouldNotThrow("navigator.getMediaDevices(devicesCallback);");
20 shouldBeEqualToString('pc.signalingState', 'stable'); 23 testPassed('After getMediaDevices');
21 pc.onsignalingstatechange = stateChanged;
22 pc.close();
23 24
24 window.jsTestIsAsync = true; 25 window.jsTestIsAsync = true;
25 window.successfullyParsed = true; 26 window.successfullyParsed = true;
26 </script> 27 </script>
27 </body> 28 </body>
28 </html> 29 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/mediastream/getMediaDevices-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698