| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |