| Index: content/test/data/media/webrtc_test_utilities.js
|
| diff --git a/content/test/data/media/webrtc_test_utilities.js b/content/test/data/media/webrtc_test_utilities.js
|
| index aa11a975912478108af4879dd16c6d35000788fe..d551b8a128906c1c54901e292ea26aff1064f3c3 100644
|
| --- a/content/test/data/media/webrtc_test_utilities.js
|
| +++ b/content/test/data/media/webrtc_test_utilities.js
|
| @@ -263,3 +263,19 @@
|
| }
|
| }
|
|
|
| +// Returns has-video-input-device to the test if there's a webcam available on
|
| +// the system.
|
| +function hasVideoInputDeviceOnSystem() {
|
| + MediaStreamTrack.getSources(function(devices) {
|
| + var hasVideoInputDevice = false;
|
| + devices.forEach(function(device) {
|
| + if (device.kind == 'video')
|
| + hasVideoInputDevice = true;
|
| + });
|
| +
|
| + if (hasVideoInputDevice)
|
| + sendValueToTest('has-video-input-device');
|
| + else
|
| + sendValueToTest('no-video-input-devices');
|
| + });
|
| +}
|
|
|