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

Unified Diff: media/capture/video/video_capture_device_unittest.cc

Issue 1815983003: Remove deprecated QTKit Video Capture Support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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: 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 97b483568b2331d885d5633129acd19ade7206c0..7ae359943907aa14a32bd3887966d4830f0cc636 100644
--- a/media/capture/video/video_capture_device_unittest.cc
+++ b/media/capture/video/video_capture_device_unittest.cc
@@ -40,9 +40,7 @@
#endif
#if defined(OS_MACOSX)
-// Mac/QTKit will always give you the size you ask for and this case will fail.
-#define MAYBE_AllocateBadSize DISABLED_AllocateBadSize
-// We will always get YUYV from the Mac QTKit/AVFoundation implementations.
+// We will always get YUYV from the Mac AVFoundation implementations.
#define MAYBE_CaptureMjpeg DISABLED_CaptureMjpeg
#elif defined(OS_WIN)
#define MAYBE_AllocateBadSize AllocateBadSize
@@ -271,33 +269,14 @@ TEST_F(VideoCaptureDeviceTest, MAYBE_OpenInvalidDevice) {
: VideoCaptureDevice::Name::DIRECT_SHOW;
VideoCaptureDevice::Name device_name("jibberish", "jibberish", api_type);
#elif defined(OS_MACOSX)
- VideoCaptureDevice::Name device_name(
- "jibberish", "jibberish", AVFoundationGlue::IsAVFoundationSupported()
- ? VideoCaptureDevice::Name::AVFOUNDATION
- : VideoCaptureDevice::Name::QTKIT);
+ VideoCaptureDevice::Name device_name("jibberish", "jibberish",
+ VideoCaptureDevice::Name::AVFOUNDATION);
#else
VideoCaptureDevice::Name device_name("jibberish", "jibberish");
#endif
scoped_ptr<VideoCaptureDevice> device =
video_capture_device_factory_->Create(device_name);
-#if !defined(OS_MACOSX)
EXPECT_TRUE(device == NULL);
-#else
- if (AVFoundationGlue::IsAVFoundationSupported()) {
- EXPECT_TRUE(device == NULL);
- } else {
- // The presence of the actual device is only checked on AllocateAndStart()
- // and not on creation for QTKit API in Mac OS X platform.
- EXPECT_CALL(*client_, OnError(_, _)).Times(1);
-
- VideoCaptureParams capture_params;
- capture_params.requested_format.frame_size.SetSize(640, 480);
- capture_params.requested_format.frame_rate = 30;
- capture_params.requested_format.pixel_format = PIXEL_FORMAT_I420;
- device->AllocateAndStart(capture_params, std::move(client_));
- device->StopAndDeAllocate();
- }
-#endif
}
TEST_P(VideoCaptureDeviceTest, CaptureWithSize) {

Powered by Google App Engine
This is Rietveld 408576698