Skip to content

Commit

Permalink
Test navigation when a SW replies with a fetch from a different URL (#…
Browse files Browse the repository at this point in the history
…14288)

The resulting document's location should be the originally requested
URL. See also whatwg/html#4205
  • Loading branch information
jyasskin authored and mfalken committed Nov 30, 2018
1 parent 026c2b6 commit 38eec61
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions service-workers/service-worker/navigation-redirect.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,24 @@
'SW-fetched redirect to other-origin in-scope.');


// SW responds with a fetch from a different url.
// SW: event.respondWith(fetch(params['url']));
url2 = SCOPE1;
url1 = SCOPE1 + 'sw=fetch-url&url=' + encodeURIComponent(url2);
redirect_test(
url1,
url1,
[
[
{url: url1, resultingClientIdTag: 'x'}
],
[],
[]
],
'x',
'SW-fetched response from different URL, same-origin same-scope.');


// Opaque redirect.
// SW: event.respondWith(fetch(
// new Request(event.request.url, {redirect: 'manual'})));
Expand Down

0 comments on commit 38eec61

Please sign in to comment.