| 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 e1b1f53128f57f87fa7c7c4b188846439cf0731a..4c44d85952af700a7c2aeb5fe3921bd68a948079 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
|
| @@ -594,9 +594,9 @@ TEST_F(MediaStreamDispatcherHostTest, GenerateStreamsWithoutWaiting) {
|
| run_loop2.Run();
|
| }
|
|
|
| -// Test that we can generate streams where a mandatory sourceId is specified in
|
| +// Test that we can generate streams where a sourceId is specified in
|
| // the request.
|
| -TEST_F(MediaStreamDispatcherHostTest, GenerateStreamsWithMandatorySourceId) {
|
| +TEST_F(MediaStreamDispatcherHostTest, GenerateStreamsWithSourceId) {
|
| ASSERT_GE(physical_audio_devices_.size(), 1u);
|
| ASSERT_GE(physical_video_devices_.size(), 1u);
|
|
|
| @@ -609,7 +609,7 @@ TEST_F(MediaStreamDispatcherHostTest, GenerateStreamsWithMandatorySourceId) {
|
| audio_it->unique_id);
|
| ASSERT_FALSE(source_id.empty());
|
| StreamControls controls(true, true);
|
| - controls.audio.device_ids.push_back(source_id);
|
| + controls.audio.device_id = source_id;
|
|
|
| SetupFakeUI(true);
|
| GenerateStreamAndWaitForResult(kRenderId, kPageRequestId, controls);
|
| @@ -624,7 +624,7 @@ TEST_F(MediaStreamDispatcherHostTest, GenerateStreamsWithMandatorySourceId) {
|
| video_it->device_id);
|
| ASSERT_FALSE(source_id.empty());
|
| StreamControls controls(true, true);
|
| - controls.video.device_ids.push_back(source_id);
|
| + controls.video.device_id = source_id;
|
|
|
| SetupFakeUI(true);
|
| GenerateStreamAndWaitForResult(kRenderId, kPageRequestId, controls);
|
| @@ -647,7 +647,7 @@ TEST_F(MediaStreamDispatcherHostTest, GenerateStreamsWithOptionalSourceId) {
|
| audio_it->unique_id);
|
| ASSERT_FALSE(source_id.empty());
|
| StreamControls controls(true, true);
|
| - controls.audio.device_ids.push_back(source_id);
|
| + controls.audio.device_id = source_id;
|
|
|
| SetupFakeUI(true);
|
| GenerateStreamAndWaitForResult(kRenderId, kPageRequestId, controls);
|
| @@ -662,7 +662,7 @@ TEST_F(MediaStreamDispatcherHostTest, GenerateStreamsWithOptionalSourceId) {
|
| video_it->device_id);
|
| ASSERT_FALSE(source_id.empty());
|
| StreamControls controls(true, true);
|
| - controls.video.device_ids.push_back(source_id);
|
| + controls.video.device_id = source_id;
|
|
|
| SetupFakeUI(true);
|
| GenerateStreamAndWaitForResult(kRenderId, kPageRequestId, controls);
|
| @@ -670,48 +670,24 @@ TEST_F(MediaStreamDispatcherHostTest, GenerateStreamsWithOptionalSourceId) {
|
| }
|
| }
|
|
|
| -// Test that generating a stream with an invalid mandatory video source id fail.
|
| -TEST_F(MediaStreamDispatcherHostTest,
|
| - GenerateStreamsWithInvalidMandatoryVideoSourceId) {
|
| +// Test that generating a stream with an invalid video source id fail.
|
| +TEST_F(MediaStreamDispatcherHostTest, GenerateStreamsWithInvalidVideoSourceId) {
|
| StreamControls controls(true, true);
|
| - controls.video.device_ids.push_back("invalid source id");
|
| + controls.video.device_id = "invalid source id";
|
|
|
| GenerateStreamAndWaitForFailure(kRenderId, kPageRequestId, controls,
|
| MEDIA_DEVICE_NO_HARDWARE);
|
| }
|
|
|
| -// Test that generating a stream with an invalid mandatory audio source id fail.
|
| -TEST_F(MediaStreamDispatcherHostTest,
|
| - GenerateStreamsWithInvalidMandatoryAudioSourceId) {
|
| +// Test that generating a stream with an invalid audio source id fail.
|
| +TEST_F(MediaStreamDispatcherHostTest, GenerateStreamsWithInvalidAudioSourceId) {
|
| StreamControls controls(true, true);
|
| - controls.audio.device_ids.push_back("invalid source id");
|
| + controls.audio.device_id = "invalid source id";
|
|
|
| GenerateStreamAndWaitForFailure(kRenderId, kPageRequestId, controls,
|
| MEDIA_DEVICE_NO_HARDWARE);
|
| }
|
|
|
| -// Test that generating a stream with an invalid optional video source id
|
| -// succeed.
|
| -TEST_F(MediaStreamDispatcherHostTest,
|
| - GenerateStreamsWithInvalidOptionalVideoSourceId) {
|
| - StreamControls controls(true, true);
|
| - controls.video.alternate_device_ids.push_back("invalid source id");
|
| -
|
| - SetupFakeUI(true);
|
| - GenerateStreamAndWaitForResult(kRenderId, kPageRequestId, controls);
|
| -}
|
| -
|
| -// Test that generating a stream with an invalid optional audio source id
|
| -// succeed.
|
| -TEST_F(MediaStreamDispatcherHostTest,
|
| - GenerateStreamsWithInvalidOptionalAudioSourceId) {
|
| - StreamControls controls(true, true);
|
| - controls.video.alternate_device_ids.push_back("invalid source id");
|
| -
|
| - SetupFakeUI(true);
|
| - GenerateStreamAndWaitForResult(kRenderId, kPageRequestId, controls);
|
| -}
|
| -
|
| TEST_F(MediaStreamDispatcherHostTest, GenerateStreamsNoAvailableVideoDevice) {
|
| physical_video_devices_.clear();
|
| video_capture_device_factory_->set_number_of_devices(0);
|
|
|