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

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

Issue 2626533002: Revert of Fix getUserMedia so that failure is reported for invalid audio sources. (Closed)
Patch Set: Created 3 years, 11 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/renderer/media/user_media_client_impl_unittest.cc
diff --git a/content/renderer/media/user_media_client_impl_unittest.cc b/content/renderer/media/user_media_client_impl_unittest.cc
index 77214b3bb20394160c9d52bb4523f6e6e8f8bef6..41f634f55f12dfe6a793f9d8ce59a85e0fae6600 100644
--- a/content/renderer/media/user_media_client_impl_unittest.cc
+++ b/content/renderer/media/user_media_client_impl_unittest.cc
@@ -206,16 +206,9 @@
create_source_that_fails_ = should_fail;
}
- static void SignalSourceReady(
- const MediaStreamSource::ConstraintsCallback& source_ready,
- MediaStreamSource* source) {
- source_ready.Run(source, MEDIA_DEVICE_OK, "");
- }
-
MediaStreamAudioSource* CreateAudioSource(
const StreamDeviceInfo& device,
- const blink::WebMediaConstraints& constraints,
- const MediaStreamSource::ConstraintsCallback& source_ready) override {
+ const blink::WebMediaConstraints& constraints) override {
MediaStreamAudioSource* source;
if (create_source_that_fails_) {
class FailedAtLifeAudioSource : public MediaStreamAudioSource {
@@ -232,15 +225,6 @@
source = new MediaStreamAudioSource(true);
}
source->SetDeviceInfo(device);
-
- if (!create_source_that_fails_) {
- // RunUntilIdle is required for this task to complete.
- base::ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE,
- base::Bind(&UserMediaClientImplUnderTest::SignalSourceReady,
- source_ready, source));
- }
-
return source;
}
@@ -362,7 +346,6 @@
ms_dispatcher_->audio_input_request_id(),
ms_dispatcher_->stream_label(), ms_dispatcher_->audio_input_array(),
ms_dispatcher_->video_array());
- base::RunLoop().RunUntilIdle();
}
void StartMockedVideoSource() {
« no previous file with comments | « content/renderer/media/user_media_client_impl.cc ('k') | content/renderer/media/webrtc/processed_local_audio_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698