Commit f994c2ce authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

Pass an actual URLLoaderFactory instance in chrome/browser/previews tests

InitDataReductionProxySettings constructs DataReductionProxyService, which later on
is provides data to DataReductionProxyIOData to construct DataReductionProxyConfig.
Ultimately, DataReductionProxyConfig constructs WarmupURLFetcher instances.

This CL is a preparation CL for [1], where we migrate WarmupURLFetcher from
URLFetcher to SimpleURLLoader. In [1], |url loader factory| is mandatory to be non-null.
Passing an actual instance at the beginning of the call chain now
has no immediate effect, but is harmless too.

[1] https://crrev.com/c/1251641

BUG=879777

Change-Id: I3f3009e6e6d9db9659e7783cbed65a1a82c6a34e
Reviewed-on: https://chromium-review.googlesource.com/1256945Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Cr-Commit-Position: refs/heads/master@{#595858}
parent bfd5389e
......@@ -61,7 +61,7 @@
#include "content/public/test/navigation_simulator.h"
#include "content/public/test/test_renderer_host.h"
#include "content/public/test/web_contents_tester.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/test/test_shared_url_loader_factory.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/page_transition_types.h"
#include "ui/base/window_open_disposition.h"
......@@ -186,7 +186,7 @@ class PreviewsInfoBarDelegateUnitTest
data_reduction_proxy_settings->InitDataReductionProxySettings(
drp_test_context_->io_data(), drp_test_context_->pref_service(),
drp_test_context_->request_context_getter(),
nullptr /* url_loader_factory */,
base::MakeRefCounted<network::TestSharedURLLoaderFactory>(),
base::WrapUnique(new data_reduction_proxy::DataStore()),
base::ThreadTaskRunnerHandle::Get(),
base::ThreadTaskRunnerHandle::Get());
......
......@@ -37,7 +37,7 @@
#include "content/public/common/previews_state.h"
#include "content/public/test/web_contents_tester.h"
#include "net/http/http_util.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/test/test_shared_url_loader_factory.h"
#if BUILDFLAG(ENABLE_OFFLINE_PAGES)
#include "chrome/browser/offline_pages/offline_page_tab_helper.h"
......@@ -81,7 +81,7 @@ class PreviewsUITabHelperUnitTest : public ChromeRenderViewHostTestHarness {
data_reduction_proxy_settings->InitDataReductionProxySettings(
drp_test_context_->io_data(), drp_test_context_->pref_service(),
drp_test_context_->request_context_getter(),
nullptr /* url_loader_factory */,
base::MakeRefCounted<network::TestSharedURLLoaderFactory>(),
base::WrapUnique(new data_reduction_proxy::DataStore()),
base::ThreadTaskRunnerHandle::Get(),
base::ThreadTaskRunnerHandle::Get());
......
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