Add a TestURLLoaderFactory::GetPendingRequest API, and start using it.

Currently, there is currently ~9 identical implementations of this
method spread across various tests / components. This CL is a first
step that eliminates this redundancy, by adding a API to it in
TestURLLoaderFactory and convert a couple of call sites.

TBR=dewittj@chromium.org (straight forward switch in //components/offline_pages).

BUG=773295

Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: Ie6b6867b046a72d0be7a7ec2bb6d964d2cfceb3e
Reviewed-on: https://chromium-review.googlesource.com/1234133
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592431}
4 files changed