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

Unified Diff: content/public/test/browser_test_utils.cc

Issue 2341643006: ImageCapture browser tests: use IsWebcamAvailableOnSystem() (Closed)
Patch Set: Created 4 years, 3 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/public/test/browser_test_utils.cc
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc
index 41df0cc65ed839dfd85fe5c0a09e5b4f8ef5ee78..3ec20b840674d393f02bd6009cf948ce8362fec6 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -418,16 +418,16 @@ void AppendGzippedResource(const base::RefCountedMemory& encoded,
// no-video-input-devices otherwise.
const char kHasVideoInputDeviceOnSystem[] =
"(function() {"
- "navigator.mediaDevices.enumerateDevices()"
- ".then(function(devices) {"
- "devices.forEach(function(device) {"
- "if (device.kind == 'video') {"
- "returnToTest('has-video-input-device');"
- "return;"
- "}"
- "});"
- "returnToTest('no-video-input-devices');"
- "});"
+ " navigator.mediaDevices.enumerateDevices()"
lunalu1 2016/09/16 16:56:22 We can revert these changes now since these have b
mcasas 2016/09/19 22:42:17 Done: PS2 doesn't touch this file anymore.
+ " .then((devices) => {"
+ " devices.forEach(function(device) {"
+ " if (device.kind == 'videoinput') {"
+ " window.domAutomationController.send('has-video-input-device');"
+ " return;"
+ " }"
+ " });"
+ " window.domAutomationController.send('no-video-input-devices');"
+ " });"
"})()";
const char kHasVideoInputDevice[] = "has-video-input-device";
« no previous file with comments | « content/browser/webrtc/webrtc_webcam_browsertest.cc ('k') | content/test/data/media/image_capture_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698