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

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

Issue 2787703004: [Mojo Video Capture] Fix VideoCaptureManager exposing implementation details to clients (Closed)
Patch Set: Rebase to April 5 Created 3 years, 8 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 | « no previous file | content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/media_devices_manager_unittest.cc
diff --git a/content/browser/renderer_host/media/media_devices_manager_unittest.cc b/content/browser/renderer_host/media/media_devices_manager_unittest.cc
index cc3356de04dc3c6fe2fd3b484a9e970055f5ede3..cbad64f8adb4b28fc0f33d138032e942cb439c1c 100644
--- a/content/browser/renderer_host/media/media_devices_manager_unittest.cc
+++ b/content/browser/renderer_host/media/media_devices_manager_unittest.cc
@@ -20,6 +20,7 @@
#include "media/audio/fake_audio_log_factory.h"
#include "media/audio/fake_audio_manager.h"
#include "media/capture/video/fake_video_capture_device_factory.h"
+#include "media/capture/video/video_capture_system_impl.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -142,13 +143,13 @@ class MediaDevicesManagerTest : public ::testing::Test {
void SetUp() override {
audio_manager_.reset(new MockAudioManager());
audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get());
+ auto video_capture_device_factory =
+ base::MakeUnique<MockVideoCaptureDeviceFactory>();
+ video_capture_device_factory_ = video_capture_device_factory.get();
+ auto video_capture_system = base::MakeUnique<media::VideoCaptureSystemImpl>(
+ std::move(video_capture_device_factory));
video_capture_manager_ = new VideoCaptureManager(
- base::MakeUnique<media::VideoCaptureSystem>(
- std::unique_ptr<media::VideoCaptureDeviceFactory>(
- new MockVideoCaptureDeviceFactory())),
- base::ThreadTaskRunnerHandle::Get());
- video_capture_device_factory_ = static_cast<MockVideoCaptureDeviceFactory*>(
- video_capture_manager_->video_capture_device_factory());
+ std::move(video_capture_system), base::ThreadTaskRunnerHandle::Get());
media_devices_manager_.reset(new MediaDevicesManager(
audio_system_.get(), video_capture_manager_, nullptr));
}
« no previous file with comments | « no previous file | content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698