Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../../resources/js-test.js"></script> | |
| 5 </head> | |
| 6 <body> | |
| 7 <script> | |
| 8 description("Tests navigator.getMediaDevices"); | |
| 9 | |
| 10 var devices = null; | |
| 11 | |
| 12 function devicesCallback(d) { | |
| 13 devices = d; | |
| 14 testPassed('Devices returned.'); | |
| 15 shouldBe('devices.length', '3'); | |
| 16 shouldBeEqualToString('devices[0].kind', 'audioinput'); | |
| 17 shouldBeEqualToString('devices[1].kind', 'audiooutput'); | |
| 18 shouldBeEqualToString('devices[2].kind', 'videoinput'); | |
|
jochen (gone - plz use gerrit)
2014/05/15 10:50:47
is it possible to assert something about the other
Henrik Grunell
2014/05/15 13:03:55
Done.
| |
| 19 finishJSTest(); | |
| 20 } | |
| 21 | |
| 22 shouldNotThrow("navigator.getMediaDevices(devicesCallback);"); | |
| 23 testPassed('After getMediaDevices'); | |
| 24 | |
| 25 window.jsTestIsAsync = true; | |
| 26 window.successfullyParsed = true; | |
| 27 </script> | |
| 28 </body> | |
| 29 </html> | |
| OLD | NEW |