Index: chrome/browser/component_updater/sw_reporter_installer_win_unittest.cc |
diff --git a/chrome/browser/component_updater/sw_reporter_installer_win_unittest.cc b/chrome/browser/component_updater/sw_reporter_installer_win_unittest.cc |
index d8fbb38fa8d5762c3b2cebc0f90798df39489729..4ca9c71bcace1f9bb152562e05f16212bbab4c73 100644 |
--- a/chrome/browser/component_updater/sw_reporter_installer_win_unittest.cc |
+++ b/chrome/browser/component_updater/sw_reporter_installer_win_unittest.cc |
@@ -23,7 +23,7 @@ |
#include "base/values.h" |
#include "base/version.h" |
#include "chrome/browser/safe_browsing/srt_fetcher_win.h" |
-#include "components/variations/variations_associated_data.h" |
+#include "components/variations/variations_params_manager.h" |
#include "content/public/test/test_browser_thread_bundle.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -144,18 +144,11 @@ class ExperimentalSwReporterInstallerTest : public SwReporterInstallerTest { |
// Assign the given variation params to the experiment group until |
// |variations_| goes out of scope when the test exits. This will also |
- // create a FieldTrial for this group. |
+ // create a FieldTrial for this group and associate the params with the |
+ // feature. |
variations_ = std::make_unique<variations::testing::VariationParamsManager>( |
- kFeatureName, params_with_group); |
- |
- // Create a feature list containing only the field trial for this group, |
- // and enable it for the length of the test. |
- base::FieldTrial* trial = base::FieldTrialList::Find(kFeatureName); |
- ASSERT_TRUE(trial); |
- auto feature_list = std::make_unique<base::FeatureList>(); |
- feature_list->RegisterFieldTrialOverride( |
- kFeatureName, base::FeatureList::OVERRIDE_ENABLE_FEATURE, trial); |
- scoped_feature_list_.InitWithFeatureList(std::move(feature_list)); |
+ kFeatureName /*trial_name*/, params_with_group, |
+ std::set<std::string>{kFeatureName} /*associated_features*/); |
} |
void ExpectAttributesWithTag(const SwReporterInstallerTraits& traits, |