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

Unified Diff: content/browser/renderer_host/media/media_devices_dispatcher_host_unittest.cc

Issue 2634263002: Pass camera facing info to audio client (Closed)
Patch Set: Pass VideoCaptureObserver as ctor parameter Created 3 years, 11 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: content/browser/renderer_host/media/media_devices_dispatcher_host_unittest.cc
diff --git a/content/browser/renderer_host/media/media_devices_dispatcher_host_unittest.cc b/content/browser/renderer_host/media/media_devices_dispatcher_host_unittest.cc
index d4149cd4e4c5b6b7a7990b011e65085c787e920e..d9ad924bbec782eb1e2f149bf165497d16405709 100644
--- a/content/browser/renderer_host/media/media_devices_dispatcher_host_unittest.cc
+++ b/content/browser/renderer_host/media/media_devices_dispatcher_host_unittest.cc
@@ -16,6 +16,7 @@
#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "component/arc/video_facing.h"
#include "content/browser/renderer_host/media/media_stream_manager.h"
#include "content/browser/renderer_host/media/media_stream_ui_proxy.h"
#include "content/browser/renderer_host/media/video_capture_manager.h"
@@ -64,6 +65,12 @@ class MockMediaDevicesListener : public ::mojom::MediaDevicesListener {
mojo::Binding<::mojom::MediaDevicesListener> binding_;
};
+class MockVideoCaptureObserver : public component::VideoCaptureObserver {
+ public:
+ MOCK_METHOD1(OnVideoCaptureStarted, void(component::VideoFacingMode));
+ MOCK_METHOD1(OnVideoCaptureStopped, void(component::VideoFacingMode));
+};
+
} // namespace
class MediaDevicesDispatcherHostTest : public testing::Test {
@@ -75,7 +82,8 @@ class MediaDevicesDispatcherHostTest : public testing::Test {
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kUseFakeDeviceForMediaStream);
audio_manager_.reset(
- new media::MockAudioManager(base::ThreadTaskRunnerHandle::Get()));
+ new media::MockAudioManager(base::ThreadTaskRunnerHandle::Get()),
+ new MockVideoCaptureObserver());
media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get()));
MockResourceContext* mock_resource_context =

Powered by Google App Engine
This is Rietveld 408576698