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

Unified Diff: content/renderer/media/media_stream_impl_unittest.cc

Issue 348443002: Revert 274823 "Support for audio output devices for getMediaDevi..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2057/src/
Patch Set: Created 6 years, 6 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
« no previous file with comments | « content/renderer/media/media_stream_impl.cc ('k') | content/renderer/media/mock_media_stream_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_stream_impl_unittest.cc
===================================================================
--- content/renderer/media/media_stream_impl_unittest.cc (revision 278170)
+++ content/renderer/media/media_stream_impl_unittest.cc (working copy)
@@ -163,17 +163,15 @@
void FakeMediaStreamDispatcherRequestUserMediaComplete() {
// Audio request ID is used as the shared request ID.
- ms_impl_->OnStreamGenerated(ms_dispatcher_->audio_input_request_id(),
+ ms_impl_->OnStreamGenerated(ms_dispatcher_->audio_request_id(),
ms_dispatcher_->stream_label(),
- ms_dispatcher_->audio_input_array(),
+ ms_dispatcher_->audio_array(),
ms_dispatcher_->video_array());
}
void FakeMediaStreamDispatcherRequestMediaDevicesComplete() {
- ms_impl_->OnDevicesEnumerated(ms_dispatcher_->audio_input_request_id(),
- ms_dispatcher_->audio_input_array());
- ms_impl_->OnDevicesEnumerated(ms_dispatcher_->audio_output_request_id(),
- ms_dispatcher_->audio_output_array());
+ ms_impl_->OnDevicesEnumerated(ms_dispatcher_->audio_request_id(),
+ ms_dispatcher_->audio_array());
ms_impl_->OnDevicesEnumerated(ms_dispatcher_->video_request_id(),
ms_dispatcher_->video_array());
}
@@ -437,39 +435,15 @@
EXPECT_EQ(MediaStreamImplUnderTest::REQUEST_SUCCEEDED,
ms_impl_->request_state());
- // Audio input device with matched output ID.
EXPECT_FALSE(ms_impl_->last_devices()[0].deviceId().isEmpty());
EXPECT_EQ(blink::WebMediaDeviceInfo::MediaDeviceKindAudioInput,
ms_impl_->last_devices()[0].kind());
EXPECT_FALSE(ms_impl_->last_devices()[0].label().isEmpty());
- EXPECT_FALSE(ms_impl_->last_devices()[0].groupId().isEmpty());
- // Audio input device without matched output ID.
EXPECT_FALSE(ms_impl_->last_devices()[1].deviceId().isEmpty());
- EXPECT_EQ(blink::WebMediaDeviceInfo::MediaDeviceKindAudioInput,
+ EXPECT_EQ(blink::WebMediaDeviceInfo::MediaDeviceKindVideoInput,
ms_impl_->last_devices()[1].kind());
EXPECT_FALSE(ms_impl_->last_devices()[1].label().isEmpty());
- EXPECT_FALSE(ms_impl_->last_devices()[1].groupId().isEmpty());
-
- // Video input device.
- EXPECT_FALSE(ms_impl_->last_devices()[2].deviceId().isEmpty());
- EXPECT_EQ(blink::WebMediaDeviceInfo::MediaDeviceKindVideoInput,
- ms_impl_->last_devices()[2].kind());
- EXPECT_FALSE(ms_impl_->last_devices()[2].label().isEmpty());
- EXPECT_TRUE(ms_impl_->last_devices()[2].groupId().isEmpty());
-
- // Audio output device.
- EXPECT_FALSE(ms_impl_->last_devices()[3].deviceId().isEmpty());
- EXPECT_EQ(blink::WebMediaDeviceInfo::MediaDeviceKindAudioOutput,
- ms_impl_->last_devices()[3].kind());
- EXPECT_FALSE(ms_impl_->last_devices()[3].label().isEmpty());
- EXPECT_FALSE(ms_impl_->last_devices()[3].groupId().isEmpty());
-
- // Verfify group IDs.
- EXPECT_TRUE(ms_impl_->last_devices()[0].groupId().equals(
- ms_impl_->last_devices()[3].groupId()));
- EXPECT_FALSE(ms_impl_->last_devices()[1].groupId().equals(
- ms_impl_->last_devices()[3].groupId()));
}
} // namespace content
« no previous file with comments | « content/renderer/media/media_stream_impl.cc ('k') | content/renderer/media/mock_media_stream_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698