| Index: media/video/capture/video_capture_device_unittest.cc
|
| ===================================================================
|
| --- media/video/capture/video_capture_device_unittest.cc (revision 181796)
|
| +++ media/video/capture/video_capture_device_unittest.cc (working copy)
|
| @@ -17,6 +17,11 @@
|
| #include "base/win/scoped_com_initializer.h"
|
| #endif
|
|
|
| +#if defined(OS_ANDROID)
|
| +#include "base/android/jni_android.h"
|
| +#include "media/video/capture/android/video_capture_device_android.h"
|
| +#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
|
| @@ -27,6 +32,18 @@
|
| // Windows currently uses DirectShow to convert from MJPEG and a raw format is
|
| // always delivered.
|
| #define MAYBE_CaptureMjpeg DISABLED_CaptureMjpeg
|
| +#elif defined(OS_ANDROID)
|
| +// TODO(wjia): enable those tests on Android.
|
| +// On Android, native camera (JAVA) delivers frames on UI thread which is the
|
| +// main thread for tests. This results in no frame received by
|
| +// VideoCaptureAndroid.
|
| +#define CaptureVGA DISABLED_CaptureVGA
|
| +#define Capture720p DISABLED_Capture720p
|
| +#define MAYBE_AllocateBadSize DISABLED_AllocateBadSize
|
| +#define ReAllocateCamera DISABLED_ReAllocateCamera
|
| +#define DeAllocateCameraWhileRunning DISABLED_DeAllocateCameraWhileRunning
|
| +#define DeAllocateCameraWhileRunning DISABLED_DeAllocateCameraWhileRunning
|
| +#define MAYBE_CaptureMjpeg DISABLED_CaptureMjpeg
|
| #else
|
| #define MAYBE_AllocateBadSize AllocateBadSize
|
| #define MAYBE_CaptureMjpeg CaptureMjpeg
|
| @@ -84,6 +101,10 @@
|
| virtual void SetUp() {
|
| frame_observer_.reset(new MockFrameObserver(&wait_event_));
|
| loop_.reset(new MessageLoopForUI());
|
| +#if defined(OS_ANDROID)
|
| + media::VideoCaptureDeviceAndroid::RegisterVideoCaptureDevice(
|
| + base::android::AttachCurrentThread());
|
| +#endif
|
| }
|
|
|
| virtual void TearDown() {
|
|
|