Index: content/browser/renderer_host/media/video_capture_manager_unittest.cc |
diff --git a/content/browser/renderer_host/media/video_capture_manager_unittest.cc b/content/browser/renderer_host/media/video_capture_manager_unittest.cc |
index 945cec8bdcf76cc3fcaafc2bdee97b097fb352ca..5c27849ccafc6c5de61a963d6e588d9d79edff2d 100644 |
--- a/content/browser/renderer_host/media/video_capture_manager_unittest.cc |
+++ b/content/browser/renderer_host/media/video_capture_manager_unittest.cc |
@@ -18,10 +18,11 @@ |
#include "base/memory/ptr_util.h" |
#include "base/memory/ref_counted.h" |
#include "base/run_loop.h" |
-#include "content/browser/browser_thread_impl.h" |
+#include "base/threading/thread_task_runner_handle.h" |
#include "content/browser/renderer_host/media/media_stream_provider.h" |
#include "content/browser/renderer_host/media/video_capture_controller_event_handler.h" |
#include "content/common/media/media_stream_options.h" |
+#include "content/public/test/test_browser_thread_bundle.h" |
#include "media/capture/video/fake_video_capture_device_factory.h" |
#include "testing/gmock/include/gmock/gmock.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -172,11 +173,6 @@ class VideoCaptureManagerTest : public testing::Test { |
protected: |
void SetUp() override { |
listener_.reset(new MockMediaStreamProviderListener()); |
- message_loop_.reset(new base::MessageLoopForIO); |
- ui_thread_.reset(new BrowserThreadImpl(BrowserThread::UI, |
- message_loop_.get())); |
- io_thread_.reset(new BrowserThreadImpl(BrowserThread::IO, |
- message_loop_.get())); |
vcm_ = new VideoCaptureManager( |
std::unique_ptr<media::VideoCaptureDeviceFactory>( |
new WrappedDeviceFactory())); |
@@ -184,7 +180,7 @@ class VideoCaptureManagerTest : public testing::Test { |
vcm_->video_capture_device_factory()); |
const int32_t kNumberOfFakeDevices = 2; |
video_capture_device_factory_->set_number_of_devices(kNumberOfFakeDevices); |
- vcm_->Register(listener_.get(), message_loop_->task_runner().get()); |
+ vcm_->Register(listener_.get(), base::ThreadTaskRunnerHandle::Get()); |
frame_observer_.reset(new MockFrameObserver()); |
base::RunLoop run_loop; |
@@ -269,9 +265,7 @@ class VideoCaptureManagerTest : public testing::Test { |
std::map<VideoCaptureControllerID, VideoCaptureController*> controllers_; |
scoped_refptr<VideoCaptureManager> vcm_; |
std::unique_ptr<MockMediaStreamProviderListener> listener_; |
- std::unique_ptr<base::MessageLoop> message_loop_; |
- std::unique_ptr<BrowserThreadImpl> ui_thread_; |
- std::unique_ptr<BrowserThreadImpl> io_thread_; |
+ TestBrowserThreadBundle thread_bundle_; |
std::unique_ptr<MockFrameObserver> frame_observer_; |
WrappedDeviceFactory* video_capture_device_factory_; |
StreamDeviceInfoArray devices_; |