Revert the send-side bwe behavior to slow ramp-up on lifted REMB cap.

The behavior was changed on https://webrtc-review.googlesource.com/c/src/+/219696. The revert is due to unknown implications for a downstream project. As REMB caps are not used with send-side bandwidth estimation it should be a noop.

Bug: webrtc:12306
Change-Id: Idecc49fda007f72512a8fc1e35d62e673b00df3d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222607
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34313}
diff --git a/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc b/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc
index 484b568..7e8d7b9 100644
--- a/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc
+++ b/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc
@@ -879,16 +879,16 @@
   EXPECT_LT(client->send_bandwidth().kbps(), 750);
 }
 
-TEST(GoogCcScenario, RampupOnRembCapLifted) {
+TEST(GoogCcScenario, FastRampupOnRembCapLiftedWithFieldTrial) {
+  ScopedFieldTrials trial("WebRTC-Bwe-ReceiverLimitCapsOnly/Enabled/");
   DataRate final_estimate =
-      RunRembDipScenario("googcc_unit/rampup_ramb_cap_lifted");
+      RunRembDipScenario("googcc_unit/fast_rampup_on_remb_cap_lifted");
   EXPECT_GT(final_estimate.kbps(), 1500);
 }
 
-TEST(GoogCcScenario, SlowRampupOnRembCapLiftedWithKillSwitch) {
-  ScopedFieldTrials trial("WebRTC-Bwe-ReceiverLimitCapsOnly/Disabled/");
+TEST(GoogCcScenario, SlowRampupOnRembCapLifted) {
   DataRate final_estimate =
-      RunRembDipScenario("googcc_unit/slow_rampup_remb_cap_lifted_killswitch");
+      RunRembDipScenario("googcc_unit/default_slow_rampup_on_remb_cap_lifted");
   EXPECT_LT(final_estimate.kbps(), 1000);
 }
 
diff --git a/modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.cc b/modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.cc
index a4ee99d..c5f51df 100644
--- a/modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.cc
+++ b/modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.cc
@@ -227,7 +227,7 @@
       high_loss_threshold_(kDefaultHighLossThreshold),
       bitrate_threshold_(kDefaultBitrateThreshold),
       loss_based_bandwidth_estimation_(key_value_config),
-      disable_receiver_limit_caps_only_("Disabled") {
+      receiver_limit_caps_only_("Enabled") {
   RTC_DCHECK(event_log);
   if (BweLossExperimentIsEnabled()) {
     uint32_t bitrate_threshold_kbps;
@@ -240,7 +240,7 @@
       bitrate_threshold_ = DataRate::KilobitsPerSec(bitrate_threshold_kbps);
     }
   }
-  ParseFieldTrial({&disable_receiver_limit_caps_only_},
+  ParseFieldTrial({&receiver_limit_caps_only_},
                   key_value_config->Lookup("WebRTC-Bwe-ReceiverLimitCapsOnly"));
 }
 
@@ -311,7 +311,7 @@
 
 DataRate SendSideBandwidthEstimation::target_rate() const {
   DataRate target = current_target_;
-  if (!disable_receiver_limit_caps_only_)
+  if (receiver_limit_caps_only_)
     target = std::min(target, receiver_limit_);
   return std::max(min_bitrate_configured_, target);
 }
@@ -585,7 +585,7 @@
 
 DataRate SendSideBandwidthEstimation::GetUpperLimit() const {
   DataRate upper_limit = delay_based_limit_;
-  if (disable_receiver_limit_caps_only_)
+  if (!receiver_limit_caps_only_)
     upper_limit = std::min(upper_limit, receiver_limit_);
   return std::min(upper_limit, max_bitrate_configured_);
 }
diff --git a/modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.h b/modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.h
index 8c1e1d0..b97b940 100644
--- a/modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.h
+++ b/modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.h
@@ -190,7 +190,7 @@
   float high_loss_threshold_;
   DataRate bitrate_threshold_;
   LossBasedBandwidthEstimation loss_based_bandwidth_estimation_;
-  FieldTrialFlag disable_receiver_limit_caps_only_;
+  FieldTrialFlag receiver_limit_caps_only_;
 };
 }  // namespace webrtc
 #endif  // MODULES_CONGESTION_CONTROLLER_GOOG_CC_SEND_SIDE_BANDWIDTH_ESTIMATION_H_