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

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

Issue 2622073003: Fix getUserMedia so that failure is reported for invalid audio sources. (Closed)
Patch Set: Switch to std::vector and std::unique_ptr 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/rtc_peer_connection_handler_unittest.cc
diff --git a/content/renderer/media/rtc_peer_connection_handler_unittest.cc b/content/renderer/media/rtc_peer_connection_handler_unittest.cc
index 63b418702f2766be47af2cc81bff8c07fcdf2137..41127627484e2910cd9bad0e835358ca9ed3c49c 100644
--- a/content/renderer/media/rtc_peer_connection_handler_unittest.cc
+++ b/content/renderer/media/rtc_peer_connection_handler_unittest.cc
@@ -301,10 +301,10 @@ class RTCPeerConnectionHandlerTest : public ::testing::Test {
media::AudioParameters::kAudioCDSampleRate,
media::CHANNEL_LAYOUT_STEREO,
media::AudioParameters::kAudioCDSampleRate / 100),
+ MockConstraintFactory().CreateWebMediaConstraints(),
+ base::Bind(&RTCPeerConnectionHandlerTest::OnAudioSourceStarted),
mock_dependency_factory_.get());
audio_source->SetAllowInvalidRenderFrameIdForTesting(true);
- audio_source->SetSourceConstraints(
- MockConstraintFactory().CreateWebMediaConstraints());
blink_audio_source.setExtraData(audio_source); // Takes ownership.
blink::WebMediaStreamSource video_source;
@@ -371,6 +371,10 @@ class RTCPeerConnectionHandlerTest : public ::testing::Test {
MediaStreamVideoTrack::GetVideoTrack(track)->Stop();
}
+ static void OnAudioSourceStarted(MediaStreamSource* source,
+ MediaStreamRequestResult result,
+ const blink::WebString& result_name) {}
+
base::MessageLoop message_loop_;
std::unique_ptr<ChildProcess> child_process_;
std::unique_ptr<MockWebRTCPeerConnectionHandlerClient> mock_client_;
« no previous file with comments | « content/renderer/media/local_media_stream_audio_source.cc ('k') | content/renderer/media/user_media_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698