Chromium Code Reviews| Index: webrtc/modules/remote_bitrate_estimator/bwe_simulations.cc | 
| diff --git a/webrtc/modules/remote_bitrate_estimator/bwe_simulations.cc b/webrtc/modules/remote_bitrate_estimator/bwe_simulations.cc | 
| index b3cb98d4e875ce1b7df155d460e105d913e3ab8f..d9f0c65fdc4d78d97dc86e0b63c57780b6ce0485 100644 | 
| --- a/webrtc/modules/remote_bitrate_estimator/bwe_simulations.cc | 
| +++ b/webrtc/modules/remote_bitrate_estimator/bwe_simulations.cc | 
| @@ -122,9 +122,62 @@ TEST_P(BweSimulation, Choke1000kbps500kbps1000kbps) { | 
| RunFor(60 * 1000); | 
| } | 
| +TEST_P(BweSimulation, SimulationsCompiled) { | 
| + AdaptiveVideoSource source(0, 30, 300, 0, 0); | 
| + PacedVideoSender sender(&uplink_, &source, GetParam()); | 
| + int zero = 0; | 
| + DelayFilter delay(&uplink_, CreateFlowIds(&zero, 1)); | 
| + delay.SetOneWayDelayMs(100); | 
| + ChokeFilter filter(&uplink_, 0); | 
| + RateCounterFilter counter(&uplink_, 0, "Receiver", bwe_names[GetParam()]); | 
| + PacketReceiver receiver(&uplink_, 0, GetParam(), true, true); | 
| + filter.set_max_delay_ms(500); | 
| + filter.set_capacity_kbps(1000); | 
| + RunFor(60 * 1000); | 
| + filter.set_capacity_kbps(500); | 
| + RunFor(50 * 1000); | 
| + filter.set_capacity_kbps(1000); | 
| + RunFor(60 * 1000); | 
| + filter.set_capacity_kbps(200); | 
| + RunFor(60 * 1000); | 
| + filter.set_capacity_kbps(50); | 
| + RunFor(60 * 1000); | 
| + filter.set_capacity_kbps(200); | 
| + RunFor(60 * 1000); | 
| + filter.set_capacity_kbps(500); | 
| + RunFor(60 * 1000); | 
| + filter.set_capacity_kbps(300); | 
| + RunFor(60 * 1000); | 
| + filter.set_capacity_kbps(1000); | 
| + RunFor(60 * 1000); | 
| + const int kStartingCapacityKbps = 150; | 
| + const int kEndingCapacityKbps = 1500; | 
| + const int kStepKbps = 5; | 
| + const int kStepTimeMs = 1000; | 
| + for (int i = kStartingCapacityKbps; i <= kEndingCapacityKbps; | 
| + i += kStepKbps) { | 
| + filter.set_capacity_kbps(i); | 
| + RunFor(kStepTimeMs); | 
| + } | 
| + for (int i = kEndingCapacityKbps; i >= kStartingCapacityKbps; | 
| + i -= kStepKbps) { | 
| + filter.set_capacity_kbps(i); | 
| + RunFor(kStepTimeMs); | 
| + } | 
| + filter.set_capacity_kbps(150); | 
| + RunFor(120 * 1000); | 
| + filter.set_capacity_kbps(500); | 
| + RunFor(60 * 1000); | 
| +} | 
| + | 
| TEST_P(BweSimulation, PacerChoke1000kbps500kbps1000kbps) { | 
| AdaptiveVideoSource source(0, 30, 300, 0, 0); | 
| PacedVideoSender sender(&uplink_, &source, GetParam()); | 
| + const int kFlowId = 0; | 
| + // CreateFlowIds() doesn't support passing int as a flow id, so we pass | 
| + // reference instead. | 
| 
 
philipel
2017/08/18 11:22:14
pass pointer
 
gnish1
2017/08/18 11:48:42
Done.
 
 | 
| + DelayFilter delay(&uplink_, CreateFlowIds(&kFlowId, 1)); | 
| + delay.SetOneWayDelayMs(100); | 
| ChokeFilter filter(&uplink_, 0); | 
| RateCounterFilter counter(&uplink_, 0, "Receiver", bwe_names[GetParam()]); | 
| PacketReceiver receiver(&uplink_, 0, GetParam(), true, true); | 
| @@ -262,6 +315,9 @@ TEST_P(BweSimulation, LinearDecreasingCapacity) { | 
| TEST_P(BweSimulation, PacerGoogleWifiTrace3Mbps) { | 
| PeriodicKeyFrameSource source(0, 30, 300, 0, 0, 1000); | 
| PacedVideoSender sender(&uplink_, &source, GetParam()); | 
| + int kFlowId = 0; | 
| + DelayFilter delay(&uplink_, CreateFlowIds(&kFlowId, 1)); | 
| 
 
philipel
2017/08/18 11:22:14
Add comment here as well.
 
gnish1
2017/08/18 11:48:42
Done.
 
 | 
| + delay.SetOneWayDelayMs(100); | 
| RateCounterFilter counter1(&uplink_, 0, "sender_output", | 
| bwe_names[GetParam()]); | 
| TraceBasedDeliveryFilter filter(&uplink_, 0, "link_capacity"); |