| Index: content/browser/renderer_host/media/video_capture_host_unittest.cc
|
| diff --git a/content/browser/renderer_host/media/video_capture_host_unittest.cc b/content/browser/renderer_host/media/video_capture_host_unittest.cc
|
| index afd77badb9b2b694d11c3df5326ac7d429fd19ac..d85d8088f67801adae318a31a407dd3a9314b1d9 100644
|
| --- a/content/browser/renderer_host/media/video_capture_host_unittest.cc
|
| +++ b/content/browser/renderer_host/media/video_capture_host_unittest.cc
|
| @@ -13,13 +13,12 @@
|
| #include "base/stl_util.h"
|
| #include "base/stringprintf.h"
|
| #include "content/browser/browser_thread_impl.h"
|
| -#include "content/browser/renderer_host/media/audio_input_device_manager.h"
|
| #include "content/browser/renderer_host/media/media_stream_manager.h"
|
| #include "content/browser/renderer_host/media/video_capture_host.h"
|
| #include "content/browser/renderer_host/media/video_capture_manager.h"
|
| #include "content/common/media/video_capture_messages.h"
|
| +#include "content/public/common/media_stream_request.h"
|
| #include "content/public/test/mock_resource_context.h"
|
| -#include "media/audio/audio_manager.h"
|
| #include "media/video/capture/video_capture_types.h"
|
| #include "net/url_request/url_request_context.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| @@ -146,7 +145,7 @@ class MockVideoCaptureHost : public VideoCaptureHost {
|
| }
|
|
|
| virtual media_stream::VideoCaptureManager* GetVideoCaptureManager() OVERRIDE {
|
| - return manager_->video_capture_manager();
|
| + return manager_->GetVideoCaptureManager(content::MEDIA_USER_VIDEO_CAPTURE);
|
| }
|
|
|
| // These handler methods do minimal things and delegate to the mock methods.
|
| @@ -211,15 +210,7 @@ class VideoCaptureHostTest : public testing::Test {
|
| message_loop_.get()));
|
|
|
| // Create our own MediaStreamManager.
|
| - audio_manager_.reset(media::AudioManager::Create());
|
| - scoped_refptr<media_stream::AudioInputDeviceManager>
|
| - audio_input_device_manager(
|
| - new media_stream::AudioInputDeviceManager(audio_manager_.get()));
|
| - scoped_refptr<media_stream::VideoCaptureManager> video_capture_manager(
|
| - new media_stream::VideoCaptureManager());
|
| - media_stream_manager_.reset(new media_stream::MediaStreamManager(
|
| - audio_input_device_manager, video_capture_manager));
|
| -
|
| + media_stream_manager_.reset(new media_stream::MediaStreamManager());
|
| #ifndef TEST_REAL_CAPTURE_DEVICE
|
| media_stream_manager_->UseFakeDevice();
|
| #endif
|
| @@ -249,8 +240,8 @@ class VideoCaptureHostTest : public testing::Test {
|
| // We need to continue running message_loop_ to complete all destructions.
|
| message_loop_->RunAllPending();
|
|
|
| - // Delete the IO message loop to delete the device thread,
|
| - // AudioInputDeviceManager and VideoCaptureManager.
|
| + // Delete the IO message loop. This will cause the MediaStreamManager to be
|
| + // notified so it will stop its device thread and device managers.
|
| message_loop_.reset();
|
| }
|
|
|
| @@ -352,7 +343,6 @@ class VideoCaptureHostTest : public testing::Test {
|
| private:
|
| scoped_ptr<MessageLoop> message_loop_;
|
| scoped_ptr<BrowserThreadImpl> io_thread_;
|
| - scoped_ptr<media::AudioManager> audio_manager_;
|
| scoped_ptr<media_stream::MediaStreamManager> media_stream_manager_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(VideoCaptureHostTest);
|
|
|