Removing callers of blink::Platform::CreateDefaultURLLoaderFactory.
This CL removes callers of blink::Platform::CreateDefaultURLLoaderFactory to help with eventual removal of this virtual method from blink::Platform. In particular, unit tests shouldn't need to go through a virtual method of Platform::Current, but should be able to instead directly interact with blink::TestingPlatformSupport or a similar class. This CL fixes PingLocalFrameClient. Before this CL, PingLocalFrameClient::CreateURLLoaderFactory would end up calling content::TestBlinkWebUnitTestSupport::CreateDefaultURLLoaderFactory. After this CL, a TestingPlatformSupport::CreateDefaultURLLoaderFactory is used instead. TestingPlatformSupport is provided by a newly introduced field in PingLoaderTest. blink::PageTestBase::platform() and EnablePlatform are not used, as they provide TestingPlatformSupportWithMockScheduler which doesn't work as a drop-in replacement for PingLoaderTest. Bug: 891872 Change-Id: Id69415930d6c4f7cce956a087662061965c96839 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2250554Reviewed-by:Kinuko Yasuda <kinuko@chromium.org> Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org> Cr-Commit-Position: refs/heads/master@{#779646}
Showing
Please register or sign in to comment