Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Unified Diff: webrtc/modules/remote_bitrate_estimator/overuse_detector_unittest.cc

Issue 1227653002: Add scoped class for overriding field trials. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/test/field_trial.h » ('j') | webrtc/test/field_trial.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/remote_bitrate_estimator/overuse_detector_unittest.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/overuse_detector_unittest.cc b/webrtc/modules/remote_bitrate_estimator/overuse_detector_unittest.cc
index 320cb43ccded8bcdce9c5bd16be5f92ea816e4c3..1bb28c8d9529a091faa69dfdce0144cdefcec3e4 100644
--- a/webrtc/modules/remote_bitrate_estimator/overuse_detector_unittest.cc
+++ b/webrtc/modules/remote_bitrate_estimator/overuse_detector_unittest.cc
@@ -603,14 +603,17 @@ TEST_F(OveruseDetectorTest, HighGaussianVarianceFastDrift2000Kbit30fps) {
}
class OveruseDetectorExperimentTest : public OveruseDetectorTest {
+ public:
+ OveruseDetectorExperimentTest()
+ : override_field_trials_(
+ "WebRTC-AdaptiveBweThreshold/Enabled-0.01,0.00018/") {}
+
protected:
void SetUp() override {
- test::InitFieldTrialsFromString(
- "WebRTC-AdaptiveBweThreshold/Enabled-0.01,0.00018/");
overuse_detector_.reset(new OveruseDetector(options_));
}
- void TearDown() override { test::InitFieldTrialsFromString(""); }
+ test::ScopedFieldTrials override_field_trials_;
};
TEST_F(OveruseDetectorExperimentTest, ThresholdAdapts) {
« no previous file with comments | « no previous file | webrtc/test/field_trial.h » ('j') | webrtc/test/field_trial.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698