Index: media/capture/video/video_capture_device_unittest.cc |
diff --git a/media/capture/video/video_capture_device_unittest.cc b/media/capture/video/video_capture_device_unittest.cc |
index 7c91d62602460b484daa8537199ec5c77e13ce98..b40a72b4ef7191801654e476e8f6de64d435de0d 100644 |
--- a/media/capture/video/video_capture_device_unittest.cc |
+++ b/media/capture/video/video_capture_device_unittest.cc |
@@ -43,6 +43,11 @@ |
#include "media/capture/video/android/video_capture_device_factory_android.h" |
#endif |
+#if defined(OS_LINUX) || defined(OS_CHROMEOS) |
+#include "media/capture/video/linux/v4l2_capture_delegate.h" |
+#include "media/capture/video/video_capture_utils.h" |
+#endif |
+ |
#if defined(OS_MACOSX) |
// Mac will always give you the size you ask for and this case will fail. |
#define MAYBE_AllocateBadSize DISABLED_AllocateBadSize |
@@ -636,4 +641,18 @@ TEST_F(VideoCaptureDeviceTest, MAYBE_GetPhotoCapabilities) { |
device->StopAndDeAllocate(); |
} |
+#if defined(OS_LINUX) || defined(OS_CHROMEOS) |
+TEST_F(VideoCaptureDeviceTest, IsY16FormatFourCcTest) { |
+// TODO(astojilj): Remove ifdefs when videodev2.h gets updated. |
+#ifdef V4L2_PIX_FMT_Z16 |
+ DCHECK(IsY16FormatFourCc(V4L2_PIX_FMT_Z16)); |
+#endif |
+#ifdef V4L2_PIX_FMT_INVZ |
+ DCHECK(IsY16FormatFourCc(V4L2_PIX_FMT_INVZ)); |
+#endif |
+ DCHECK(IsY16FormatFourCc(V4L2_PIX_FMT_Y16)); |
+ DCHECK(!IsY16FormatFourCc(V4L2_PIX_FMT_YUV420)); |
+} |
+#endif |
+ |
}; // namespace media |