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

Side by Side Diff: content/public/test/browser_test_utils.cc

Issue 2579183003: Fix typo in JS test code checking for Webcam in browser_test_utils.cc (Closed)
Patch Set: Created 4 years 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/public/test/browser_test_utils.h" 5 #include "content/public/test/browser_test_utils.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <tuple> 8 #include <tuple>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 // This does not guarantee that a getUserMedia with video will succeed, as the 400 // This does not guarantee that a getUserMedia with video will succeed, as the
401 // camera could be busy for instance. 401 // camera could be busy for instance.
402 // 402 //
403 // Returns has-video-input-device to the test if there is a webcam available, 403 // Returns has-video-input-device to the test if there is a webcam available,
404 // no-video-input-devices otherwise. 404 // no-video-input-devices otherwise.
405 const char kHasVideoInputDeviceOnSystem[] = 405 const char kHasVideoInputDeviceOnSystem[] =
406 "(function() {" 406 "(function() {"
407 "navigator.mediaDevices.enumerateDevices()" 407 "navigator.mediaDevices.enumerateDevices()"
408 ".then(function(devices) {" 408 ".then(function(devices) {"
409 "devices.forEach(function(device) {" 409 "devices.forEach(function(device) {"
410 "if (device.kind == 'video-input') {" 410 "if (device.kind == 'videoinput') {"
411 "window.domAutomationController.send('has-video-input-device');" 411 "window.domAutomationController.send('has-video-input-device');"
412 "return;" 412 "return;"
413 "}" 413 "}"
414 "});" 414 "});"
415 "window.domAutomationController.send('no-video-input-devices');" 415 "window.domAutomationController.send('no-video-input-devices');"
416 "});" 416 "});"
417 "})()"; 417 "})()";
418 418
419 const char kHasVideoInputDevice[] = "has-video-input-device"; 419 const char kHasVideoInputDevice[] = "has-video-input-device";
420 420
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1841 IPC::IpcSecurityTestUtil::PwnMessageReceived( 1841 IPC::IpcSecurityTestUtil::PwnMessageReceived(
1842 process->GetChannel(), 1842 process->GetChannel(),
1843 FileSystemHostMsg_Write(request_id, file_path, blob_uuid, position)); 1843 FileSystemHostMsg_Write(request_id, file_path, blob_uuid, position));
1844 1844
1845 // If this started an async operation, wait for it to complete. 1845 // If this started an async operation, wait for it to complete.
1846 if (waiter.did_start_update()) 1846 if (waiter.did_start_update())
1847 waiter.WaitForEndUpdate(); 1847 waiter.WaitForEndUpdate();
1848 } 1848 }
1849 1849
1850 } // namespace content 1850 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698