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

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

Issue 2697033006: Switching MediaStreamManager from using AudioManager to AudioSystem (Closed)
Patch Set: weak pointers removed Created 3 years, 9 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 | « content/browser/renderer_host/media/media_stream_manager_unittest.cc ('k') | media/audio/audio_system.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/video_capture_unittest.cc
diff --git a/content/browser/renderer_host/media/video_capture_unittest.cc b/content/browser/renderer_host/media/video_capture_unittest.cc
index ad44124fc44b05d17f3e69f1fae47dcddf3a9ba9..c8ea3c0440e8a73fcfa7f37579201b119c74d7db 100644
--- a/content/browser/renderer_host/media/video_capture_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_unittest.cc
@@ -28,6 +28,7 @@
#include "content/public/test/test_browser_context.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "content/test/test_content_browser_client.h"
+#include "media/audio/audio_system_impl.h"
#include "media/audio/mock_audio_manager.h"
#include "media/base/media_switches.h"
#include "media/capture/video_capture_types.h"
@@ -116,6 +117,7 @@ class VideoCaptureTest : public testing::Test,
: thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
audio_manager_(
new media::MockAudioManager(base::ThreadTaskRunnerHandle::Get())),
+ audio_system_(media::AudioSystemImpl::Create(audio_manager_.get())),
task_runner_(base::ThreadTaskRunnerHandle::Get()),
opened_session_id_(kInvalidMediaCaptureSessionId),
observer_binding_(this) {}
@@ -127,7 +129,8 @@ class VideoCaptureTest : public testing::Test,
switches::kUseFakeDeviceForMediaStream);
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kUseFakeUIForMediaStream);
- media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get()));
+ media_stream_manager_ =
+ base::MakeUnique<MediaStreamManager>(audio_system_.get());
// Create a Host and connect it to a simulated IPC channel.
host_.reset(new VideoCaptureHost(media_stream_manager_.get()));
@@ -311,6 +314,7 @@ class VideoCaptureTest : public testing::Test,
// |audio_manager_| needs to outlive |thread_bundle_| because it uses the
// underlying message loop.
media::ScopedAudioManagerPtr audio_manager_;
+ std::unique_ptr<media::AudioSystem> audio_system_;
content::TestBrowserContext browser_context_;
content::TestContentBrowserClient browser_client_;
const scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
« no previous file with comments | « content/browser/renderer_host/media/media_stream_manager_unittest.cc ('k') | media/audio/audio_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698