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

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

Issue 2878233002: media: add ArcCamera3Service Mojo service (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « media/capture/video/chromeos/video_capture_device_factory_chromeos.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6910b8f225afa21fa5e1e30a9918f5a7aff40152..6e3ab3a11d60ec6550aaafb136c6ec3aa2d2d077 100644
--- a/media/capture/video/video_capture_device_unittest.cc
+++ b/media/capture/video/video_capture_device_unittest.cc
@@ -42,6 +42,12 @@
#include "media/capture/video/android/video_capture_device_factory_android.h"
#endif
+#if defined(OS_CHROMEOS)
+#include "media/capture/video/chromeos/video_capture_device_arc_chromeos.h"
+#include "media/capture/video/chromeos/video_capture_device_factory_chromeos.h"
+#include "mojo/edk/embedder/embedder.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
@@ -59,7 +65,7 @@
#define MAYBE_CaptureMjpeg CaptureMjpeg
#define MAYBE_TakePhoto TakePhoto
#define MAYBE_GetPhotoCapabilities GetPhotoCapabilities
-#elif defined(OS_LINUX)
+#elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
// AllocateBadSize will hang when a real camera is attached and if more than one
// test is trying to use the camera (even across processes). Do NOT renable
// this test without fixing the many bugs associated with it:
@@ -68,6 +74,11 @@
#define MAYBE_CaptureMjpeg CaptureMjpeg
#define MAYBE_TakePhoto TakePhoto
#define MAYBE_GetPhotoCapabilities GetPhotoCapabilities
+#elif defined(OS_CHROMEOS)
+#define MAYBE_AllocateBadSize DISABLED_AllocateBadSize
+#define MAYBE_CaptureMjpeg DISABLED_CaptureMjpeg
+#define MAYBE_TakePhoto DISABLED_TakePhoto
+#define MAYBE_GetPhotoCapabilities DISABLED_GetPhotoCapabilities
#else
#define MAYBE_AllocateBadSize AllocateBadSize
#define MAYBE_CaptureMjpeg CaptureMjpeg
@@ -205,6 +216,30 @@ class MockImageCaptureClient
mojom::PhotoCapabilitiesPtr capabilities_;
};
+#if defined(OS_CHROMEOS)
+
+class VideoCaptureDeviceTestEnvironment final : public testing::Environment {
chfremer 2017/05/18 17:24:39 Despite the name, this class does not seem to have
+ public:
+ VideoCaptureDeviceTestEnvironment() : mojo_ipc_thread_("MojoIpcThread") {}
+
+ ~VideoCaptureDeviceTestEnvironment() final {}
+
+ void SetUp() final {
+ mojo_ipc_thread_.StartWithOptions(
+ base::Thread::Options(base::MessageLoop::TYPE_IO, 0));
+ mojo::edk::Init();
+ mojo::edk::InitIPCSupport(mojo_ipc_thread_.task_runner());
+ }
+
+ private:
+ base::Thread mojo_ipc_thread_;
+};
+
+testing::Environment* const vcd_test_env =
+ testing::AddGlobalTestEnvironment(new VideoCaptureDeviceTestEnvironment);
+
+#endif
+
} // namespace
class VideoCaptureDeviceTest : public testing::TestWithParam<gfx::Size> {
« no previous file with comments | « media/capture/video/chromeos/video_capture_device_factory_chromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698