Chromium Code Reviews| Index: media/video/capture/video_capture_device_unittest.cc |
| =================================================================== |
| --- media/video/capture/video_capture_device_unittest.cc (revision 179001) |
| +++ 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,15 @@ |
| // 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. |
|
Ami GONE FROM CHROMIUM
2013/01/28 23:55:47
Do you want to enumerate here the reasons why each
wjia(left Chromium)
2013/01/30 18:25:47
Added comments on the reason why these tests can't
|
| +#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 |
| @@ -79,6 +93,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() { |