Delete obsolete usage of FakeConstraints

Bug: webrtc:9239
Change-Id: I16f3bdaab6f8eee9e2c5ebc0044dd6e86dac9562
Reviewed-on: https://webrtc-review.googlesource.com/c/122500
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26648}
This commit is contained in:
Niels Möller
2019-02-12 12:30:58 +01:00
committed by Commit Bot
parent 9bf67eae29
commit 5c4ddad059
5 changed files with 11 additions and 24 deletions

View File

@ -39,7 +39,6 @@ using testing::Values;
using testing::_;
using webrtc::DataChannelInterface;
using webrtc::FakeConstraints;
using webrtc::MediaStreamInterface;
using webrtc::PeerConnectionInterface;
using webrtc::SdpSemantics;
@ -100,16 +99,14 @@ class PeerConnectionEndToEndBaseTest : public sigslot::has_slots<>,
void GetAndAddUserMedia() {
cricket::AudioOptions audio_options;
FakeConstraints video_constraints;
GetAndAddUserMedia(true, audio_options, true, video_constraints);
GetAndAddUserMedia(true, audio_options, true);
}
void GetAndAddUserMedia(bool audio,
const cricket::AudioOptions& audio_options,
bool video,
const FakeConstraints& video_constraints) {
caller_->GetAndAddUserMedia(audio, audio_options, video, video_constraints);
callee_->GetAndAddUserMedia(audio, audio_options, video, video_constraints);
bool video) {
caller_->GetAndAddUserMedia(audio, audio_options, video);
callee_->GetAndAddUserMedia(audio, audio_options, video);
}
void Negotiate() {

View File

@ -31,7 +31,6 @@
#include "api/stats/rtc_stats.h"
#include "api/stats/rtc_stats_report.h"
#include "api/stats/rtcstats_objects.h"
#include "api/test/fake_constraints.h"
#include "pc/rtc_stats_traversal.h"
#include "pc/test/peer_connection_test_wrapper.h"
#include "pc/test/rtc_stats_obtainer.h"
@ -133,10 +132,8 @@ class RTCStatsIntegrationTest : public testing::Test {
PeerConnectionTestWrapper::Connect(caller_.get(), callee_.get());
// Get user media for audio and video
caller_->GetAndAddUserMedia(true, cricket::AudioOptions(), true,
FakeConstraints());
callee_->GetAndAddUserMedia(true, cricket::AudioOptions(), true,
FakeConstraints());
caller_->GetAndAddUserMedia(true, cricket::AudioOptions(), true);
callee_->GetAndAddUserMedia(true, cricket::AudioOptions(), true);
// Create data channels
DataChannelInit init;

View File

@ -39,7 +39,6 @@
#include "rtc_base/time_utils.h"
#include "test/gtest.h"
using webrtc::FakeConstraints;
using webrtc::FakeVideoTrackRenderer;
using webrtc::IceCandidateInterface;
using webrtc::MediaStreamInterface;
@ -277,10 +276,9 @@ bool PeerConnectionTestWrapper::CheckForVideo() {
void PeerConnectionTestWrapper::GetAndAddUserMedia(
bool audio,
const cricket::AudioOptions& audio_options,
bool video,
const webrtc::FakeConstraints& video_constraints) {
bool video) {
rtc::scoped_refptr<webrtc::MediaStreamInterface> stream =
GetUserMedia(audio, audio_options, video, video_constraints);
GetUserMedia(audio, audio_options, video);
for (const auto& audio_track : stream->GetAudioTracks()) {
EXPECT_TRUE(peer_connection_->AddTrack(audio_track, {stream->id()}).ok());
}
@ -293,8 +291,7 @@ rtc::scoped_refptr<webrtc::MediaStreamInterface>
PeerConnectionTestWrapper::GetUserMedia(
bool audio,
const cricket::AudioOptions& audio_options,
bool video,
const webrtc::FakeConstraints& video_constraints) {
bool video) {
std::string stream_id =
kStreamIdBase + rtc::ToString(num_get_user_media_calls_++);
rtc::scoped_refptr<webrtc::MediaStreamInterface> stream =

View File

@ -25,7 +25,6 @@
#include "api/rtc_error.h"
#include "api/rtp_receiver_interface.h"
#include "api/scoped_refptr.h"
#include "api/test/fake_constraints.h"
#include "pc/test/fake_audio_capture_module.h"
#include "pc/test/fake_video_track_renderer.h"
#include "rtc_base/third_party/sigslot/sigslot.h"
@ -91,8 +90,7 @@ class PeerConnectionTestWrapper
void WaitForVideo();
void GetAndAddUserMedia(bool audio,
const cricket::AudioOptions& audio_options,
bool video,
const webrtc::FakeConstraints& video_constraints);
bool video);
// sigslots
sigslot::signal1<std::string*> SignalOnIceCandidateCreated;
@ -111,8 +109,7 @@ class PeerConnectionTestWrapper
rtc::scoped_refptr<webrtc::MediaStreamInterface> GetUserMedia(
bool audio,
const cricket::AudioOptions& audio_options,
bool video,
const webrtc::FakeConstraints& video_constraints);
bool video);
std::string name_;
rtc::Thread* const network_thread_;

View File

@ -82,7 +82,6 @@ char kLSanDefaultSuppressions[] =
"leak:webrtc::AudioDeviceLinuxALSA::InitMicrophone\n"
"leak:webrtc::AudioDeviceLinuxALSA::InitSpeaker\n"
"leak:webrtc::CreateIceCandidate\n"
"leak:webrtc::FakeConstraints::AddOptional\n"
"leak:webrtc::WebRtcIdentityRequestObserver::OnSuccess\n"
"leak:webrtc::WebRtcSessionDescriptionFactory::InternalCreateAnswer\n"
"leak:webrtc::WebRtcSessionDescriptionFactory::InternalCreateOffer\n"