Adds SetForTest method on FieldTrialParameter class.
This is useful in tests as it allows overriding the default after construction. It's not intended for use in production (as it can be confusing to readers). Bug: webrtc:10365 Change-Id: I8ac2541f2626e7fddbb61bdae72e9571ce9d7b97 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130468 Commit-Queue: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27389}
This commit is contained in:

committed by
Commit Bot

parent
4e2d015be8
commit
1c4547d1f9
@ -76,6 +76,8 @@ class FieldTrialParameter : public FieldTrialParameterInterface {
|
||||
operator T() const { return Get(); }
|
||||
const T* operator->() const { return &value_; }
|
||||
|
||||
void SetForTest(T value) { value_ = value; }
|
||||
|
||||
protected:
|
||||
bool Parse(absl::optional<std::string> str_value) override {
|
||||
if (str_value) {
|
||||
|
Reference in New Issue
Block a user