Fuzzer: Check ancestors for web url loader factory override.

We might create child frames, and those frames will need to create
a URL loader factory. Since we override the factory before we actually
parse and create child frames, we can't set it directly on all possible
children. Instead, when asked to create a factory and we don't have
an override, navigate the ancestor chain and check if any of the
ancestors have an override.

This also adds a Clone function, since we need to be able to retain
multiple copies of the override (one for each of the child frames,
and one for self).

R=yhirano@chromium.org

Bug: 986050
Change-Id: I5d1023379eb4b7c305e3b07640ee6a4d31a2d9d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1717677
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Stefan Zager <szager@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682384}
4 files changed