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

Unified Diff: content/browser/renderer_host/media/media_stream_manager_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_stream_manager_unittest.cc
diff --git a/content/browser/renderer_host/media/media_stream_manager_unittest.cc b/content/browser/renderer_host/media/media_stream_manager_unittest.cc
index 89accb6450a39e584716a6985a84df9222becd02..c8a22d27acee105e5c89e47abd7dcd85b544987c 100644
--- a/content/browser/renderer_host/media/media_stream_manager_unittest.cc
+++ b/content/browser/renderer_host/media/media_stream_manager_unittest.cc
@@ -15,6 +15,7 @@
#include "base/strings/string_util.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
+#include "component/arc/video_facing.h"
#include "content/browser/browser_thread_impl.h"
#include "content/browser/renderer_host/media/media_stream_manager.h"
#include "content/browser/renderer_host/media/media_stream_requester.h"
@@ -159,6 +160,12 @@ class MockMediaStreamRequester : public MediaStreamRequester {
DISALLOW_COPY_AND_ASSIGN(MockMediaStreamRequester);
};
+class MockVideoCaptureObserver : public component::VideoCaptureObserver {
+ public:
+ MOCK_METHOD1(OnVideoCaptureStarted, void(component::VideoFacingMode));
+ MOCK_METHOD1(OnVideoCaptureStopped, void(component::VideoFacingMode));
+};
+
} // namespace
class MediaStreamManagerTest : public ::testing::Test {
@@ -166,7 +173,7 @@ class MediaStreamManagerTest : public ::testing::Test {
MediaStreamManagerTest()
: thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {
audio_manager_.reset(new MockAudioManager());
- media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get()));
+ media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get(), new MockVideoCaptureObserver()));
base::RunLoop().RunUntilIdle();
}

Powered by Google App Engine
This is Rietveld 408576698