Test field trial group with startswith rather than equals.

BUG=webrtc:7266

Review-Url: https://codereview.webrtc.org/2717973005
Cr-Commit-Position: refs/heads/master@{#16915}
This commit is contained in:
sprang
2017-02-28 08:50:47 -08:00
committed by Commit bot
parent f8ee65ead6
commit c1b57a15bf
23 changed files with 42 additions and 46 deletions

View File

@ -51,8 +51,8 @@ void BitrateController::MakeDecision(
// Current implementation of BitrateController can only work when
// |metrics.target_audio_bitrate_bps| includes overhead is enabled. This is
// currently governed by the following field trial.
RTC_DCHECK_EQ("Enabled", webrtc::field_trial::FindFullName(
"WebRTC-SendSideBwe-WithOverhead"));
RTC_DCHECK(
webrtc::field_trial::IsEnabled("WebRTC-SendSideBwe-WithOverhead"));
if (config->frame_length_ms)
frame_length_ms_ = *config->frame_length_ms;
int overhead_rate_bps =

View File

@ -183,8 +183,8 @@ AudioEncoderOpus::AudioEncoderOpus(
const Config& config,
AudioNetworkAdaptorCreator&& audio_network_adaptor_creator,
std::unique_ptr<SmoothingFilter> bitrate_smoother)
: send_side_bwe_with_overhead_(webrtc::field_trial::FindFullName(
"WebRTC-SendSideBwe-WithOverhead") == "Enabled"),
: send_side_bwe_with_overhead_(webrtc::field_trial::IsEnabled(
"WebRTC-SendSideBwe-WithOverhead")),
packet_loss_rate_(0.0),
inst_(nullptr),
packet_loss_fraction_smoother_(new PacketLossFractionSmoother(

View File

@ -22,7 +22,7 @@ TEST(NetEqPerformanceTest, Run) {
const int kLossPeriod = 10; // Drop every 10th packet.
const double kDriftFactor = 0.1;
int64_t runtime = webrtc::test::NetEqPerformanceTest::Run(
webrtc::field_trial::FindFullName("WebRTC-QuickPerfTest") == "Enabled"
webrtc::field_trial::IsEnabled("WebRTC-QuickPerfTest")
? kQuickSimulationTimeMs
: kSimulationTimeMs,
kLossPeriod, kDriftFactor);
@ -40,7 +40,7 @@ TEST(NetEqPerformanceTest, RunClean) {
const int kLossPeriod = 0; // No losses.
const double kDriftFactor = 0.0; // No clock drift.
int64_t runtime = webrtc::test::NetEqPerformanceTest::Run(
webrtc::field_trial::FindFullName("WebRTC-QuickPerfTest") == "Enabled"
webrtc::field_trial::IsEnabled("WebRTC-QuickPerfTest")
? kQuickSimulationTimeMs
: kSimulationTimeMs,
kLossPeriod, kDriftFactor);