DocumentLoader: make srcdoc navigations async (attempt #2)

about:srcdoc is not actually an empty document, so there is no real need
to load it synchronously.

data-saver.html is split in two, because it relied on specific order
between calling internals.setSaveDataEnabled and committing navigation
for two separate srcdoc iframes.

Includes the following fixes comparing to attempt #1:

1. When script removes iframe's srcdoc attribute after the navigation
has been scheduled, but before we retrieve the srcdoc content from
the attribute, we could try to load about:srcdoc from the network.
Instead, we should just load an empty document.

2. Iframe with src="about:srcdoc" should just load blank instead
of issuing a network request for about:srcdoc.

3. Simplify how we pass "is srcdoc" to the document
itself, now using DocumentInit instead of calling a method on
FrameLoader. This avoids a similar race between starting the main
resource load and creating a document.

Bug: 919839, 855189
Change-Id: Ie5a9cbcf66ab93b9deea09ee8e756d10e48c741b
Commit-Queue: Dmitry Gozman <>
Reviewed-by: Nate Chapin <>
Cr-Commit-Position: refs/heads/master@{#624479}
13 files changed