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

Unified Diff: content/test/data/media/webrtc_test_utilities.js

Issue 663793003: Relanding WebRTC real webcam browsertest for Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
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 0f8f0a947da5e9814d1528698cd77195ddc47ee3..5fd38113882b7c6bf7f9db219850291da9e4d2c6 100644
--- a/content/test/data/media/webrtc_test_utilities.js
+++ b/content/test/data/media/webrtc_test_utilities.js
@@ -213,3 +213,19 @@ function assertNotEquals(expected, actual) {
}
}
+// 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');
+ });
+}
« no previous file with comments | « content/test/data/media/getusermedia-real-webcam.html ('k') | content/test/webrtc_content_browsertest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698