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

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

Issue 8177008: Adding VideoCaptureDevice for Mac. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Changes based on comments by dmac and scherkus. Created 9 years, 2 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/video/capture/video_capture_device_unittest.cc
diff --git a/media/video/capture/video_capture_device_unittest.cc b/media/video/capture/video_capture_device_unittest.cc
index 7cb40bc27139fc7482867cb60c6ec10e685b0c7a..b9f6dd5d71e3d1436c0398fa39345166bc59cf0e 100644
--- a/media/video/capture/video_capture_device_unittest.cc
+++ b/media/video/capture/video_capture_device_unittest.cc
@@ -11,6 +11,23 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+#if defined(OS_MACOSX)
+// These tests requires a runloop to be created in the test.
+#define MAYBE_CaptureVGA DISABLED_CaptureVGA
+#define MAYBE_Capture720p DISABLED_Capture720p
+#define MAYBE_AllocateSameCameraTwice DISABLED_AllocateSameCameraTwice
+#define MAYBE_AllocateBadSize DISABLED_AllocateBadSize
+#define MAYBE_ReAllocateCamera DISABLED_ReAllocateCamera
+#define MAYBE_DeAllocateCameraWhileRunning DISABLED_DeAllocateCameraWhileRunning
+#else
+#define MAYBE_CaptureVGA CaptureVGA
+#define MAYBE_Capture720p Capture720p
+#define MAYBE_AllocateSameCameraTwice AllocateSameCameraTwice
+#define MAYBE_AllocateBadSize AllocateBadSize
+#define MAYBE_ReAllocateCamera ReAllocateCamera
+#define MAYBE_DeAllocateCameraWhileRunning DeAllocateCameraWhileRunning
+#endif
+
using ::testing::_;
using ::testing::AnyNumber;
using ::testing::Return;
@@ -69,7 +86,7 @@ TEST_F(VideoCaptureDeviceTest, OpenInvalidDevice) {
EXPECT_TRUE(device == NULL);
}
-TEST_F(VideoCaptureDeviceTest, CaptureVGA) {
+TEST_F(VideoCaptureDeviceTest, MAYBE_CaptureVGA) {
VideoCaptureDevice::GetDeviceNames(&names_);
if (!names_.size()) {
LOG(WARNING) << "No camera available. Exiting test.";
@@ -96,7 +113,7 @@ TEST_F(VideoCaptureDeviceTest, CaptureVGA) {
device->DeAllocate();
}
-TEST_F(VideoCaptureDeviceTest, Capture720p) {
+TEST_F(VideoCaptureDeviceTest, MAYBE_Capture720p) {
VideoCaptureDevice::GetDeviceNames(&names_);
if (!names_.size()) {
LOG(WARNING) << "No camera available. Exiting test.";
@@ -125,7 +142,7 @@ TEST_F(VideoCaptureDeviceTest, Capture720p) {
device->DeAllocate();
}
-TEST_F(VideoCaptureDeviceTest, AllocateSameCameraTwice) {
+TEST_F(VideoCaptureDeviceTest, MAYBE_AllocateSameCameraTwice) {
VideoCaptureDevice::GetDeviceNames(&names_);
if (!names_.size()) {
LOG(WARNING) << "No camera available. Exiting test.";
@@ -152,7 +169,7 @@ TEST_F(VideoCaptureDeviceTest, AllocateSameCameraTwice) {
device2->DeAllocate();
}
-TEST_F(VideoCaptureDeviceTest, AllocateBadSize) {
+TEST_F(VideoCaptureDeviceTest, MAYBE_AllocateBadSize) {
VideoCaptureDevice::GetDeviceNames(&names_);
if (!names_.size()) {
LOG(WARNING) << "No camera available. Exiting test.";
@@ -173,7 +190,7 @@ TEST_F(VideoCaptureDeviceTest, AllocateBadSize) {
device->DeAllocate();
}
-TEST_F(VideoCaptureDeviceTest, ReAllocateCamera) {
+TEST_F(VideoCaptureDeviceTest, MAYBE_ReAllocateCamera) {
VideoCaptureDevice::GetDeviceNames(&names_);
if (!names_.size()) {
LOG(WARNING) << "No camera available. Exiting test.";
@@ -205,7 +222,7 @@ TEST_F(VideoCaptureDeviceTest, ReAllocateCamera) {
device->DeAllocate();
}
-TEST_F(VideoCaptureDeviceTest, DeAllocateCameraWhileRunning) {
+TEST_F(VideoCaptureDeviceTest, MAYBE_DeAllocateCameraWhileRunning) {
VideoCaptureDevice::GetDeviceNames(&names_);
if (!names_.size()) {
LOG(WARNING) << "No camera available. Exiting test.";

Powered by Google App Engine
This is Rietveld 408576698