Closed Bug 1737692 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 31378 - Fetch: Plumb request initiator through passthrough service workers.

Categories

(Core :: DOM: Service Workers, task, P4)

task

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 31378 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/31378
Details from upstream follow.

Ben Kelly <wanderview@chromium.org> wrote:

Fetch: Plumb request initiator through passthrough service workers.

This CL contains essentially two changes:

  1. The request initiator origin is plumbed through service workers
    that do fetch(evt.request). In addition to plumbing, this
    requires changes to how we validate navigation requests in the
    CorsURLLoaderFactory.
  2. Introduces an internal flag to indicate that a request should be
    treated as a main-frame navigation for SameSite cookie computation.
    This is necessary to override the service worker's IsolationInfo when
    a navigation request is passed through.

For more detailed information about these changes please see the
internal design doc at:

https://docs.google.com/document/d/1KZscujuV7bCFEnzJW-0DaCPU-I40RJimQKoCcI0umTQ/edit?usp=sharing

In addition, there is some discussion of these features in the following
spec issues:

https://github.com/whatwg/fetch/issues/1321
https://github.com/whatwg/fetch/issues/1327

Bug: 1115847,1241188
Change-Id: I7e236fa20aeabb705aef40fcf8d5c36da6d2798c

Reviewed-on: https://chromium-review.googlesource.com/3115917
WPT-Export-Revision: 84fbf4e6161f1e3eb21de78c4dd2e3a0a0734f17

Component: web-platform-tests → DOM: Service Workers
Product: Testing → Core

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 14 tests and 10 subtests

Status Summary

Firefox

OK : 13
PASS : 328
FAIL : 20
TIMEOUT: 2
NOTRUN : 25

Chrome

OK : 14
PASS : 352
FAIL : 22

Safari

OK : 12
PASS : 310
FAIL : 50
TIMEOUT: 4
NOTRUN : 12

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

/service-workers/service-worker/fetch-csp.https.html
Verify CSP control of fetch() in a Service Worker: FAIL
/service-workers/service-worker/same-site-cookies.https.html
same-origin, window.open with passthrough: TIMEOUT
same-origin, window.open with change-request: NOTRUN
same-site, window.open with no service worker: NOTRUN
same-site, window.open with fallback: NOTRUN
same-site, window.open with passthrough: NOTRUN
same-site, window.open with change-request: NOTRUN

New Tests That Don't Pass

/service-workers/service-worker/fetch-csp.https.html
Verify CSP control of fetch() in a Service Worker: FAIL (Chrome: PASS, Safari: PASS)
/service-workers/service-worker/navigation-headers.https.html
GET Navigation, same-origin with navpreload service worker sets correct origin and referer headers.: FAIL (Chrome: PASS, Safari: FAIL)
POST Navigation, same-site with passthrough service worker sets correct origin and referer headers.: FAIL (Chrome: FAIL, Safari: PASS)
GET Navigation, same-site with navpreload service worker sets correct origin and referer headers.: FAIL (Chrome: PASS, Safari: FAIL)
POST Navigation, cross-site with passthrough service worker sets correct origin and referer headers.: FAIL (Chrome: FAIL, Safari: PASS)
GET Navigation, cross-site with navpreload service worker sets correct origin and referer headers.: FAIL (Chrome: PASS, Safari: FAIL)
GET Navigation, same-origin with passthrough service worker sets correct sec-fetch headers.: FAIL (Chrome: FAIL, Safari: FAIL)
POST Navigation, same-origin with passthrough service worker sets correct sec-fetch headers.: FAIL (Chrome: FAIL, Safari: FAIL)
GET Navigation, same-origin with navpreload service worker sets correct sec-fetch headers.: FAIL (Chrome: PASS, Safari: FAIL)
GET Navigation, same-site with passthrough service worker sets correct sec-fetch headers.: FAIL (Chrome: FAIL, Safari: FAIL)
POST Navigation, same-site with passthrough service worker sets correct sec-fetch headers.: FAIL (Chrome: FAIL, Safari: FAIL)
GET Navigation, same-site with navpreload service worker sets correct sec-fetch headers.: FAIL (Chrome: PASS, Safari: FAIL)
GET Navigation, cross-site with passthrough service worker sets correct sec-fetch headers.: FAIL (Chrome: FAIL, Safari: FAIL)
POST Navigation, cross-site with passthrough service worker sets correct sec-fetch headers.: FAIL (Chrome: FAIL, Safari: FAIL)
GET Navigation, cross-site with navpreload service worker sets correct sec-fetch headers.: FAIL (Chrome: PASS, Safari: FAIL)
/service-workers/service-worker/navigation-redirect-resolution.https.html
test relative opaqueredirect: FAIL (Chrome: FAIL, Safari: PASS)
test relative opaqueredirect with CacheStorage: FAIL (Chrome: FAIL, Safari: PASS)
test relative opaqueredirect with clone: FAIL (Chrome: FAIL, Safari: PASS)
/service-workers/service-worker/next-hop-protocol.https.html
nextHopProtocol reports H1 correctly when routed via a service worker.: FAIL (Chrome: PASS, Safari: FAIL)
nextHopProtocol reports H2 correctly when routed via a service worker.: FAIL (Chrome: FAIL, Safari: FAIL)
/service-workers/service-worker/same-site-cookies.https.html: TIMEOUT (Chrome: OK, Safari: TIMEOUT)
same-origin, window.open with passthrough: TIMEOUT (Chrome: PASS, Safari: PASS)
same-origin, window.open with change-request: NOTRUN (Chrome: PASS, Safari: PASS)
same-origin, window.open with navpreload: NOTRUN (Chrome: PASS, Safari: FAIL)
same-site, window.open with no service worker: NOTRUN (Chrome: PASS, Safari: PASS)
same-site, window.open with fallback: NOTRUN (Chrome: PASS, Safari: PASS)
same-site, window.open with passthrough: NOTRUN (Chrome: PASS, Safari: PASS)
same-site, window.open with change-request: NOTRUN (Chrome: PASS, Safari: PASS)
same-site, window.open with navpreload: NOTRUN (Chrome: PASS, Safari: FAIL)
cross-site, window.open with no service worker: NOTRUN (Chrome: PASS, Safari: FAIL)
cross-site, window.open with fallback: NOTRUN (Chrome: PASS, Safari: FAIL)
cross-site, window.open with passthrough: NOTRUN (Chrome: FAIL, Safari: FAIL)
cross-site, window.open with change-request: NOTRUN (Chrome: PASS, Safari: FAIL)
cross-site, window.open with navpreload: NOTRUN (Chrome: PASS, Safari: FAIL)
same-origin, form post with no service worker: NOTRUN (Chrome: PASS, Safari: TIMEOUT)
same-origin, form post with fallback: NOTRUN (Chrome: PASS, Safari: NOTRUN)
same-origin, form post with passthrough: NOTRUN (Chrome: PASS, Safari: NOTRUN)
same-origin, form post with change-request: NOTRUN (Chrome: PASS, Safari: NOTRUN)
same-site, form post with no service worker: NOTRUN (Chrome: PASS, Safari: NOTRUN)
same-site, form post with fallback: NOTRUN (Chrome: PASS, Safari: NOTRUN)
same-site, form post with passthrough: NOTRUN (Chrome: PASS, Safari: NOTRUN)
same-site, form post with change-request: NOTRUN (Chrome: PASS, Safari: NOTRUN)
cross-site, form post with no service worker: NOTRUN (Chrome: FAIL, Safari: NOTRUN)
cross-site, form post with fallback: NOTRUN (Chrome: FAIL, Safari: NOTRUN)
cross-site, form post with passthrough: NOTRUN (Chrome: FAIL, Safari: NOTRUN)
cross-site, form post with change-request: NOTRUN (Chrome: PASS, Safari: NOTRUN)
Cleanup service workers: NOTRUN (Chrome: PASS, Safari: NOTRUN)

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/869632db39a2 [wpt PR 31378] - Fetch: Plumb request initiator through passthrough service workers., a=testonly https://hg.mozilla.org/integration/autoland/rev/23c8e41009ff [wpt PR 31378] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
You need to log in before you can comment on or make changes to this bug.