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

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

Issue 2715513008: Make FakeVideoCaptureDeviceFactory configurable to arbitrary fake device configurations (Closed)
Patch Set: emircan@ suggestions Created 3 years, 10 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
Index: content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
index 6a2a9bf9bcb065d24f2c28c3e0ea064b165f3d90..c71b1a47ded4f6b7b8ae06bac32c73e45c89ab35 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
@@ -473,7 +473,7 @@ TEST_F(MediaStreamDispatcherHostTest, GenerateStreamWithDepthVideo) {
// Video device on index 1 is depth video capture device. The number of fake
// devices is 2.
physical_video_devices_.clear();
- video_capture_device_factory_->set_number_of_devices(2);
+ video_capture_device_factory_->SetToDefaultDevicesConfig(2);
video_capture_device_factory_->GetDeviceDescriptors(&physical_video_devices_);
// We specify to generate both audio and video stream.
StreamControls controls(true, true);
@@ -680,7 +680,7 @@ TEST_F(MediaStreamDispatcherHostTest, GenerateStreamsWithInvalidAudioSourceId) {
TEST_F(MediaStreamDispatcherHostTest, GenerateStreamsNoAvailableVideoDevice) {
physical_video_devices_.clear();
- video_capture_device_factory_->set_number_of_devices(0);
+ video_capture_device_factory_->SetToDefaultDevicesConfig(0);
video_capture_device_factory_->GetDeviceDescriptors(&physical_video_devices_);
StreamControls controls(true, true);
@@ -837,7 +837,7 @@ TEST_F(MediaStreamDispatcherHostTest, VideoDeviceUnplugged) {
EXPECT_EQ(host_->audio_devices_.size(), 1u);
EXPECT_EQ(host_->video_devices_.size(), 1u);
- video_capture_device_factory_->set_number_of_devices(0);
+ video_capture_device_factory_->SetToDefaultDevicesConfig(0);
base::RunLoop run_loop;
EXPECT_CALL(*host_.get(), OnDeviceStopped(kRenderId))

Powered by Google App Engine
This is Rietveld 408576698