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 2b063b3d2268ca4d363e586eeac3d9e2f66cfc23..794193f22947881b7011fecc2b3d3be4707ce945 100644 |
--- a/content/browser/renderer_host/media/video_capture_manager_unittest.cc |
+++ b/content/browser/renderer_host/media/video_capture_manager_unittest.cc |
@@ -15,6 +15,7 @@ |
#include "content/browser/renderer_host/media/media_stream_provider.h" |
#include "content/browser/renderer_host/media/video_capture_manager.h" |
#include "content/common/media/media_stream_options.h" |
+#include "content/public/common/media_stream_request.h" |
#include "media/video/capture/video_capture_device.h" |
#include "testing/gmock/include/gmock/gmock.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -83,7 +84,8 @@ class VideoCaptureManagerTest : public testing::Test { |
message_loop_.reset(new MessageLoop(MessageLoop::TYPE_IO)); |
io_thread_.reset(new BrowserThreadImpl(BrowserThread::IO, |
message_loop_.get())); |
- vcm_ = new media_stream::VideoCaptureManager(); |
+ vcm_ = new media_stream::VideoCaptureManager( |
+ content::MEDIA_STREAM_DEVICE_TYPE_USER_VIDEO_CAPTURE); |
vcm_->UseFakeDevice(); |
vcm_->Register(listener_.get(), message_loop_->message_loop_proxy()); |
frame_observer_.reset(new MockFrameObserver()); |
@@ -109,10 +111,10 @@ TEST_F(VideoCaptureManagerTest, CreateAndClose) { |
EXPECT_CALL(*listener_, DevicesEnumerated(_)) |
.Times(1); |
EXPECT_CALL(*listener_, |
- Opened(content::MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE, _)) |
+ Opened(content::MEDIA_STREAM_DEVICE_TYPE_USER_VIDEO_CAPTURE, _)) |
.Times(1); |
EXPECT_CALL(*listener_, |
- Closed(content::MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE, _)) |
+ Closed(content::MEDIA_STREAM_DEVICE_TYPE_USER_VIDEO_CAPTURE, _)) |
.Times(1); |
vcm_->EnumerateDevices(); |
@@ -143,10 +145,10 @@ TEST_F(VideoCaptureManagerTest, OpenTwice) { |
EXPECT_CALL(*listener_, DevicesEnumerated(_)) |
.Times(1); |
EXPECT_CALL(*listener_, |
- Opened(content::MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE, _)) |
+ Opened(content::MEDIA_STREAM_DEVICE_TYPE_USER_VIDEO_CAPTURE, _)) |
.Times(2); |
EXPECT_CALL(*listener_, |
- Closed(content::MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE, _)) |
+ Closed(content::MEDIA_STREAM_DEVICE_TYPE_USER_VIDEO_CAPTURE, _)) |
.Times(2); |
vcm_->EnumerateDevices(); |
@@ -175,10 +177,10 @@ TEST_F(VideoCaptureManagerTest, OpenTwo) { |
EXPECT_CALL(*listener_, DevicesEnumerated(_)) |
.Times(1); |
EXPECT_CALL(*listener_, |
- Opened(content::MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE, _)) |
+ Opened(content::MEDIA_STREAM_DEVICE_TYPE_USER_VIDEO_CAPTURE, _)) |
.Times(2); |
EXPECT_CALL(*listener_, |
- Closed(content::MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE, _)) |
+ Closed(content::MEDIA_STREAM_DEVICE_TYPE_USER_VIDEO_CAPTURE, _)) |
.Times(2); |
vcm_->EnumerateDevices(); |
@@ -206,8 +208,9 @@ TEST_F(VideoCaptureManagerTest, OpenNotExisting) { |
InSequence s; |
EXPECT_CALL(*listener_, DevicesEnumerated(_)) |
.Times(1); |
- EXPECT_CALL(*listener_, Error(content::MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE, |
- _, media_stream::kDeviceNotAvailable)) |
+ EXPECT_CALL(*listener_, |
+ Error(content::MEDIA_STREAM_DEVICE_TYPE_USER_VIDEO_CAPTURE, |
+ _, media_stream::kDeviceNotAvailable)) |
.Times(1); |
vcm_->EnumerateDevices(); |
@@ -216,7 +219,7 @@ TEST_F(VideoCaptureManagerTest, OpenNotExisting) { |
message_loop_->RunAllPending(); |
media_stream::MediaStreamType stream_type = |
- content::MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE; |
+ content::MEDIA_STREAM_DEVICE_TYPE_USER_VIDEO_CAPTURE; |
std::string device_name("device_doesnt_exist"); |
std::string device_id("id_doesnt_exist"); |
media_stream::StreamDeviceInfo dummy_device(stream_type, device_name, |
@@ -234,10 +237,10 @@ TEST_F(VideoCaptureManagerTest, OpenNotExisting) { |
TEST_F(VideoCaptureManagerTest, StartUsingId) { |
InSequence s; |
EXPECT_CALL(*listener_, |
- Opened(content::MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE, _)) |
+ Opened(content::MEDIA_STREAM_DEVICE_TYPE_USER_VIDEO_CAPTURE, _)) |
.Times(1); |
EXPECT_CALL(*listener_, |
- Closed(content::MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE, _)) |
+ Closed(content::MEDIA_STREAM_DEVICE_TYPE_USER_VIDEO_CAPTURE, _)) |
.Times(1); |
media::VideoCaptureParams capture_params; |
@@ -265,10 +268,10 @@ TEST_F(VideoCaptureManagerTest, CloseWithoutStop) { |
EXPECT_CALL(*listener_, DevicesEnumerated(_)) |
.Times(1); |
EXPECT_CALL(*listener_, |
- Opened(content::MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE, _)) |
+ Opened(content::MEDIA_STREAM_DEVICE_TYPE_USER_VIDEO_CAPTURE, _)) |
.Times(1); |
EXPECT_CALL(*listener_, |
- Closed(content::MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE, _)) |
+ Closed(content::MEDIA_STREAM_DEVICE_TYPE_USER_VIDEO_CAPTURE, _)) |
.Times(1); |
vcm_->EnumerateDevices(); |