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}
diff --git a/pc/peer_connection_end_to_end_unittest.cc b/pc/peer_connection_end_to_end_unittest.cc
index b01a69b..ae8366f 100644
--- a/pc/peer_connection_end_to_end_unittest.cc
+++ b/pc/peer_connection_end_to_end_unittest.cc
@@ -39,7 +39,6 @@
 using testing::_;
 
 using webrtc::DataChannelInterface;
-using webrtc::FakeConstraints;
 using webrtc::MediaStreamInterface;
 using webrtc::PeerConnectionInterface;
 using webrtc::SdpSemantics;
@@ -100,16 +99,14 @@
 
   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() {
diff --git a/pc/rtc_stats_integrationtest.cc b/pc/rtc_stats_integrationtest.cc
index f0fc2f3..7fddfff 100644
--- a/pc/rtc_stats_integrationtest.cc
+++ b/pc/rtc_stats_integrationtest.cc
@@ -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 @@
     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;
diff --git a/pc/test/peer_connection_test_wrapper.cc b/pc/test/peer_connection_test_wrapper.cc
index e2015f8..d05022f 100644
--- a/pc/test/peer_connection_test_wrapper.cc
+++ b/pc/test/peer_connection_test_wrapper.cc
@@ -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 @@
 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 @@
 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 =
diff --git a/pc/test/peer_connection_test_wrapper.h b/pc/test/peer_connection_test_wrapper.h
index 67f5673..2dc88e9 100644
--- a/pc/test/peer_connection_test_wrapper.h
+++ b/pc/test/peer_connection_test_wrapper.h
@@ -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 @@
   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 @@
   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_;
diff --git a/tools_webrtc/sanitizers/lsan_suppressions_webrtc.cc b/tools_webrtc/sanitizers/lsan_suppressions_webrtc.cc
index a195386..064b280 100644
--- a/tools_webrtc/sanitizers/lsan_suppressions_webrtc.cc
+++ b/tools_webrtc/sanitizers/lsan_suppressions_webrtc.cc
@@ -82,7 +82,6 @@
     "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"