Removing callers of blink::Platform::CreateDefaultURLLoaderFactory (3).
This CL removes callers of blink::Platform::CreateDefaultURLLoaderFactory to help with eventual removal of this virtual method from blink::Platform. This CL relies on an earlier https://crrev.com/c/2261419, which provides a way to get the singleton WebURLLoaderMockFactory. This CL uses the singleton mock factory to construct WebURLLoaderFactoryWithMock (instead of going via blink::Platform::CreateDefaultURLLoaderFactory) in the following places: - TestWebFrameClient::CreateURLLoaderFactory - DummyLocalFrameClient::CreateURLLoaderFactory - TestLoaderFactory's constructor Additionally, this CL further tweaks PingLoaderTest, so that it doesn't go through TestingPlatformSupport::CreateDefaultURLLoaderFactory, but instead also directly constructs a WebURLLoaderFactoryWithMock. Also, this CL has to tweak ResourceLoaderDefersLoadingTest which before this CL depended on TestLoaderFactory going via Platform::CreateDefaultURLLoaderFactory and ending up in ResourceLoaderDefersLoadingTest::TestWebURLLoaderFactory::CreateDefault... After this CL, the ResourceLoaderDefersLoadingTest::CreateFetcher method directly constructs a ResourceLoader that wraps the test data (e.g. |bool web_url_loader_defers_| and ProcessCodeCacheRequestCallback). After this CL, ResourceLoaderDefersLoadingTest no longer needs to override Platform methods. Similar changes are needed in ModuleScriptLoaderTest, WorkletModuleResponsesMapTest and ResourceFetcherTest. After this CL and after https://crrev.com/c/2250081, there should be no more callers of blink::Platform::CreateDefaultURLLoaderFactory - this method can be removed altogether in a follow-up CL: https://crrev.com/c/2264503 Bug: 751425, 891872 Change-Id: I9190d4012ad8d1eb2ce554239265d46c2de52cf0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2260778 Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org> Reviewed-by:Kinuko Yasuda <kinuko@chromium.org> Cr-Commit-Position: refs/heads/master@{#783023}
Showing
Please register or sign in to comment