Commit 0711b516 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:
/chrome/browser/chrome_content_browser_client_unittest.cc

This CL was uploaded by git cl split.

Bug: 1018667
Change-Id: I08e044ff1aac9d05677a3041f5f757dca61124ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1916870
Auto-Submit: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715255}
parent 0df8aa40
......@@ -25,7 +25,6 @@
#include "chrome/test/base/testing_profile.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/search_engines/template_url_service.h"
#include "components/variations/entropy_provider.h"
#include "components/variations/variations_associated_data.h"
#include "components/version_info/version_info.h"
#include "content/public/browser/browsing_data_filter_builder.h"
......@@ -230,8 +229,7 @@ class BlinkSettingsFieldTrialTest : public testing::Test {
static const char kFakeGroupName[];
BlinkSettingsFieldTrialTest()
: trial_list_(NULL),
command_line_(base::CommandLine::NO_PROGRAM) {}
: command_line_(base::CommandLine::NO_PROGRAM) {}
void SetUp() override {
command_line_.AppendSwitchASCII(
......@@ -274,7 +272,6 @@ class BlinkSettingsFieldTrialTest : public testing::Test {
static const int kFakeChildProcessId = 1;
ChromeContentBrowserClient client_;
base::FieldTrialList trial_list_;
base::CommandLine command_line_;
content::BrowserTaskEnvironment task_environment_;
......@@ -319,12 +316,6 @@ namespace content {
class InstantNTPURLRewriteTest : public BrowserWithTestWindowTest {
protected:
void SetUp() override {
BrowserWithTestWindowTest::SetUp();
field_trial_list_.reset(new base::FieldTrialList(
std::make_unique<variations::SHA1EntropyProvider>("42")));
}
void InstallTemplateURLWithNewTabPage(GURL new_tab_page_url) {
TemplateURLServiceFactory::GetInstance()->SetTestingFactoryAndUse(
profile(),
......@@ -341,8 +332,6 @@ class InstantNTPURLRewriteTest : public BrowserWithTestWindowTest {
template_url_service->Add(std::make_unique<TemplateURL>(data));
template_url_service->SetUserSelectedDefaultSearchProvider(template_url);
}
std::unique_ptr<base::FieldTrialList> field_trial_list_;
};
TEST_F(InstantNTPURLRewriteTest, UberURLHandler_InstantExtendedNewTabPage) {
......
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