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

Pass an actual URLLoaderFactory instance in chrome/browser/renderer_context_menu 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: I5165506e34e31b62a511d02b6e157f3554cc6594
Reviewed-on: https://chromium-review.googlesource.com/c/1256982Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Cr-Commit-Position: refs/heads/master@{#596022}
parent 7f6604cb
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include "content/public/test/web_contents_tester.h" #include "content/public/test/web_contents_tester.h"
#include "extensions/browser/extension_prefs.h" #include "extensions/browser/extension_prefs.h"
#include "extensions/common/url_pattern.h" #include "extensions/common/url_pattern.h"
#include "services/network/public/cpp/shared_url_loader_factory.h" #include "services/network/test/test_shared_url_loader_factory.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/web/web_context_menu_data.h" #include "third_party/blink/public/web/web_context_menu_data.h"
#include "url/gurl.h" #include "url/gurl.h"
...@@ -440,7 +440,7 @@ class RenderViewContextMenuPrefsTest : public ChromeRenderViewHostTestHarness { ...@@ -440,7 +440,7 @@ class RenderViewContextMenuPrefsTest : public ChromeRenderViewHostTestHarness {
settings->InitDataReductionProxySettings( settings->InitDataReductionProxySettings(
drp_test_context_->io_data(), drp_test_context_->pref_service(), drp_test_context_->io_data(), drp_test_context_->pref_service(),
drp_test_context_->request_context_getter(), drp_test_context_->request_context_getter(),
nullptr /* url_loader_factory */, base::MakeRefCounted<network::TestSharedURLLoaderFactory>(),
std::make_unique<data_reduction_proxy::DataStore>(), std::make_unique<data_reduction_proxy::DataStore>(),
base::ThreadTaskRunnerHandle::Get(), base::ThreadTaskRunnerHandle::Get(),
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