Commit 9dfa79fc authored by Mikel Astiz's avatar Mikel Astiz Committed by Commit Bot

Do not instantiate base::FieldTrialList explicitly in tests

The test suite already instantiates a FieldTrialList as per
https://chromium-review.googlesource.com/c/chromium/src/+/1883567 so
it's no longer necessary to do so explicitly in tests.

This patch addresses unit tests under:
/chromecast

This CL was uploaded by git cl split.

R=yucliu@chromium.org

Bug: 1018667
Change-Id: I5a8328c5e68585b67e8bc0c64acb4182b4b2ef45
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1916469
Auto-Submit: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: default avatarYuchen Liu <yucliu@chromium.org>
Commit-Queue: Yuchen Liu <yucliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715360}
parent da53a48e
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "chromecast/base/cast_features.h" #include "chromecast/base/cast_features.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/field_trial_params.h" #include "base/metrics/field_trial_params.h"
#include "base/values.h" #include "base/values.h"
#include "testing/gmock/include/gmock/gmock.h" #include "testing/gmock/include/gmock/gmock.h"
...@@ -25,7 +24,7 @@ const char kTestParamsFeatureName[] = "test_params_feature"; ...@@ -25,7 +24,7 @@ const char kTestParamsFeatureName[] = "test_params_feature";
class CastFeaturesTest : public testing::Test { class CastFeaturesTest : public testing::Test {
public: public:
CastFeaturesTest() : field_trial_list_(nullptr) {} CastFeaturesTest() {}
~CastFeaturesTest() override {} ~CastFeaturesTest() override {}
// testing::Test implementation: // testing::Test implementation:
...@@ -40,10 +39,6 @@ class CastFeaturesTest : public testing::Test { ...@@ -40,10 +39,6 @@ class CastFeaturesTest : public testing::Test {
} }
private: private:
// A field trial list must be created before attempting to create FieldTrials.
// In production, this instance lives in CastBrowserMainParts.
base::FieldTrialList field_trial_list_;
std::unique_ptr<base::FeatureList> original_feature_list_; std::unique_ptr<base::FeatureList> original_feature_list_;
DISALLOW_COPY_AND_ASSIGN(CastFeaturesTest); DISALLOW_COPY_AND_ASSIGN(CastFeaturesTest);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment