blob: 80fee0c427a1cde00e8187cd410580678913d36c [file] [log] [blame]
andresp@webrtc.org60015d22014-05-16 09:39:511/*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
Mirko Bonadei92ea95e2017-09-15 04:47:3111#include "test/field_trial.h"
andresp@webrtc.org60015d22014-05-16 09:39:5112
13#include <algorithm>
14#include <cassert>
15#include <cstdio>
16#include <cstdlib>
17#include <map>
18#include <string>
19
Mirko Bonadei92ea95e2017-09-15 04:47:3120#include "system_wrappers/include/field_trial.h"
andresp@webrtc.org60015d22014-05-16 09:39:5121
22namespace webrtc {
andresp@webrtc.org60015d22014-05-16 09:39:5123namespace test {
Jonas Olsson5b2eda42019-06-11 12:29:4024void ValidateFieldTrialsStringOrDie(const std::string&) {}
pbos19492f12015-07-07 15:22:2725
26ScopedFieldTrials::ScopedFieldTrials(const std::string& config)
Yves Gerey665174f2018-06-19 13:03:0527 : previous_field_trials_(webrtc::field_trial::GetFieldTrialString()) {
phoglund37ebcf02016-01-08 13:04:5728 current_field_trials_ = config;
Bjorn Tereliusedab3012018-01-31 16:23:4029 webrtc::field_trial::InitFieldTrialsFromString(current_field_trials_.c_str());
pbos19492f12015-07-07 15:22:2730}
31
32ScopedFieldTrials::~ScopedFieldTrials() {
phoglund37ebcf02016-01-08 13:04:5733 webrtc::field_trial::InitFieldTrialsFromString(previous_field_trials_);
pbos19492f12015-07-07 15:22:2734}
35
andresp@webrtc.org60015d22014-05-16 09:39:5136} // namespace test
37} // namespace webrtc