Upstream service worker navigation tests to WPT
**navigation-redirect**
Update existing assertions to adhere to the latest version of the Fetch
specification. The relevant change from that document [1] is explained
as follows:
> [...]
> * Only when redirects are automatically followed should we set the
> skip-service-worker flag, otherwise we negatively affect navigations.
> [...]
(Note that the Request's "skip-service-worker flag" was subsequently
re-implemented as "service-workers mode" in [2].)
Insert two additional tests introduced by Chromium project commit
cb6838f5badc8c2df03f387f4aa726629214179a, whose message reads:
> Make no-location redirect response to be "opaque redirect" when
> redirect mode is manual.
>
> According to the spec, even if location header is not set, we should
> treat the redirect response as "opaqueredirect" if the redirect mode
> of the fetch request is "manual".
>
> This behavior was changed by this commit on the spec.
>
https://github.com/whatwg/fetch/commit/3e501f29eceff41eb81c60fb9937e33e23cf5492
Remove the "-expectations.txt" file for this test since Chromium passes
the corrected version. Remove the Chromium-specific version of the test.
**navigation-redirect-body**
Re-locate test file to Web Platform Test directory for eventual
automated upstreaming. Simplify test body by constructing necessary DOM
declaratively with HTML. Schedule frame removal to occur following test
completion.
**navigation-redirect-to-http**
Re-locate test file to Web Platform Test directory for eventual
automated upstreaming. Prefer the generalized `redirect.py` script over
a test-specific script defining equivalent functionality. Correct typo
in test title.
[1]
https://github.com/whatwg/fetch/commit/ec6f5ef5f99cb6b0dd6c701b49791810fb380b04
[2]
https://github.com/whatwg/fetch/commit/d41c2380dc828e7a23c6196a344b42b2d0e9beec
BUG=
688116
R=mek@chromium.org
Review-Url:
https://codereview.chromium.org/2872363002
Cr-Commit-Position: refs/heads/master@{#472332}
Committed:
https://chromium.googlesource.com/chromium/src/+/e5241c1ac5cf149707ce97b0a877e0529bd61de2