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

Unified Diff: content/browser/renderer_host/media/audio_renderer_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/audio_renderer_host_unittest.cc
diff --git a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
index 41d6ffb367814d179de470a8976fbf5d5f95499b..bbd2631600d70f6e537124a4b73112dee48c67fd 100644
--- a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
+++ b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
@@ -15,6 +15,7 @@
#include "base/run_loop.h"
#include "base/sync_socket.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "component/arc/video_facing.h"
#include "content/browser/media/capture/audio_mirroring_manager.h"
#include "content/browser/media/media_internals.h"
#include "content/browser/renderer_host/media/audio_input_device_manager.h"
@@ -121,6 +122,12 @@ class FakeAudioManagerWithAssociations : public media::FakeAudioManager {
std::map<std::string, std::string> associations_;
};
+class MockVideoCaptureObserver : public component::VideoCaptureObserver {
+ public:
+ MOCK_METHOD1(OnVideoCaptureStarted, void(component::VideoFacingMode));
+ MOCK_METHOD1(OnVideoCaptureStopped, void(component::VideoFacingMode));
+};
+
} // namespace
class MockAudioRendererHost : public AudioRendererHost {
@@ -238,7 +245,7 @@ class AudioRendererHostTest : public testing::Test {
render_process_host_(&browser_context_, &auth_run_loop_) {
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kUseFakeDeviceForMediaStream);
- media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get()));
+ media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get(), new MockVideoCaptureObserver()));
host_ = new MockAudioRendererHost(
&auth_run_loop_, render_process_host_.GetID(), audio_manager_.get(),
&mirroring_manager_, media_stream_manager_.get(), kSalt);

Powered by Google App Engine
This is Rietveld 408576698