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

Side by Side Diff: content/renderer/media/rtc_peer_connection_handler_unittest.cc

Issue 2941563002: Enable new getUserMedia audio constraints algorithm behind a flag. (Closed)
Patch Set: remove vertical space from DEPS Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/rtc_peer_connection_handler.h" 5 #include "content/renderer/media/rtc_peer_connection_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 blink::WebString::FromUTF8("audio_track"), 294 blink::WebString::FromUTF8("audio_track"),
295 false /* remote */); 295 false /* remote */);
296 ProcessedLocalAudioSource* const audio_source = 296 ProcessedLocalAudioSource* const audio_source =
297 new ProcessedLocalAudioSource( 297 new ProcessedLocalAudioSource(
298 -1 /* consumer_render_frame_id is N/A for non-browser tests */, 298 -1 /* consumer_render_frame_id is N/A for non-browser tests */,
299 StreamDeviceInfo(MEDIA_DEVICE_AUDIO_CAPTURE, "Mock device", 299 StreamDeviceInfo(MEDIA_DEVICE_AUDIO_CAPTURE, "Mock device",
300 "mock_device_id", 300 "mock_device_id",
301 media::AudioParameters::kAudioCDSampleRate, 301 media::AudioParameters::kAudioCDSampleRate,
302 media::CHANNEL_LAYOUT_STEREO, 302 media::CHANNEL_LAYOUT_STEREO,
303 media::AudioParameters::kAudioCDSampleRate / 100), 303 media::AudioParameters::kAudioCDSampleRate / 100),
304 MockConstraintFactory().CreateWebMediaConstraints(), 304 AudioProcessingProperties(),
305 base::Bind(&RTCPeerConnectionHandlerTest::OnAudioSourceStarted), 305 base::Bind(&RTCPeerConnectionHandlerTest::OnAudioSourceStarted),
306 mock_dependency_factory_.get()); 306 mock_dependency_factory_.get());
307 audio_source->SetAllowInvalidRenderFrameIdForTesting(true); 307 audio_source->SetAllowInvalidRenderFrameIdForTesting(true);
308 blink_audio_source.SetExtraData(audio_source); // Takes ownership. 308 blink_audio_source.SetExtraData(audio_source); // Takes ownership.
309 309
310 blink::WebMediaStreamSource video_source; 310 blink::WebMediaStreamSource video_source;
311 video_source.Initialize(blink::WebString::FromUTF8(video_track_label), 311 video_source.Initialize(blink::WebString::FromUTF8(video_track_label),
312 blink::WebMediaStreamSource::kTypeVideo, 312 blink::WebMediaStreamSource::kTypeVideo,
313 blink::WebString::FromUTF8("video_track"), 313 blink::WebString::FromUTF8("video_track"),
314 false /* remote */); 314 false /* remote */);
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1460 testing::Ref(tracks[0]))); 1460 testing::Ref(tracks[0])));
1461 1461
1462 std::unique_ptr<blink::WebRTCDTMFSenderHandler> sender( 1462 std::unique_ptr<blink::WebRTCDTMFSenderHandler> sender(
1463 pc_handler_->CreateDTMFSender(tracks[0])); 1463 pc_handler_->CreateDTMFSender(tracks[0]));
1464 EXPECT_TRUE(sender.get()); 1464 EXPECT_TRUE(sender.get());
1465 1465
1466 StopAllTracks(local_stream); 1466 StopAllTracks(local_stream);
1467 } 1467 }
1468 1468
1469 } // namespace content 1469 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_audio_processor_unittest.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