| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "device/capture/video/mac/video_capture_device_factory_mac.h" |
| 5 #include "device/capture/video/mac/video_capture_device_mac.h" |
| 4 #import "media/base/mac/avfoundation_glue.h" | 6 #import "media/base/mac/avfoundation_glue.h" |
| 5 #include "media/capture/video/mac/video_capture_device_factory_mac.h" | |
| 6 #include "media/capture/video/mac/video_capture_device_mac.h" | |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 | 8 |
| 9 namespace media { | 9 namespace device { |
| 10 | 10 |
| 11 TEST(VideoCaptureDeviceFactoryMacTest, ListDevicesAVFoundation) { | 11 TEST(VideoCaptureDeviceFactoryMacTest, ListDevicesAVFoundation) { |
| 12 AVFoundationGlue::InitializeAVFoundation(); | 12 AVFoundationGlue::InitializeAVFoundation(); |
| 13 VideoCaptureDeviceFactoryMac video_capture_device_factory; | 13 VideoCaptureDeviceFactoryMac video_capture_device_factory; |
| 14 | 14 |
| 15 VideoCaptureDeviceDescriptors descriptors; | 15 VideoCaptureDeviceDescriptors descriptors; |
| 16 video_capture_device_factory.GetDeviceDescriptors(&descriptors); | 16 video_capture_device_factory.GetDeviceDescriptors(&descriptors); |
| 17 if (descriptors.empty()) { | 17 if (descriptors.empty()) { |
| 18 DVLOG(1) << "No camera available. Exiting test."; | 18 DVLOG(1) << "No camera available. Exiting test."; |
| 19 return; | 19 return; |
| 20 } | 20 } |
| 21 for (const auto& descriptor : descriptors) | 21 for (const auto& descriptor : descriptors) |
| 22 EXPECT_EQ(VideoCaptureApi::MACOSX_AVFOUNDATION, descriptor.capture_api); | 22 EXPECT_EQ(VideoCaptureApi::MACOSX_AVFOUNDATION, descriptor.capture_api); |
| 23 } | 23 } |
| 24 | 24 |
| 25 }; // namespace media | 25 }; // namespace device |
| OLD | NEW |