Closed Bug 1694580 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 27756 - Make streaming upload work with network fallback on service worker

Categories

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

task

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

b'Yutaka Hirano <yhirano@chromium.org>' wrote:

Make streaming upload work with network fallback on service worker

This partially implements https://github.com/whatwg/fetch/pull/1144 and
https://github.com/w3c/ServiceWorker/issues/1560.

ServiceWorkerSubresourceLoader reuses the request body in the original
request in the network fallback case
(ServiceWorkerSubresourceLoader::OnFallback). This is problematic for
a request with streaming upload body, because the body is not copyable.

Ideally we should tee the body as specified in
https://github.com/whatwg/fetch/pull/1144 and
https://github.com/w3c/ServiceWorker/issues/1560, but this CL stops
passing the body to the service worker instead to unblock the origin
trial, assuming that few users care about the streaming body in the
service worker.

Bug: 1165690
Change-Id: Ie1d2d2fd74990b1bf7f9b10e55710a644871cc60

Reviewed-on: https://chromium-review.googlesource.com/2712842
WPT-Export-Revision: 814b45bf1fe811e3fe5af46f5abaf2505b71c0ed

PR 27756 applied with additional changes from upstream: c30545df6a50c61f3673ed952c78c0a607100d45, 96d965117a1dc50aae39ec04588bb47b63c722e0, a59db6cf877207b8146be71851c0d658262f5289, 71e7d57543bc5da35cf2a4bef155a2d0ff149776
Component: web-platform-tests → DOM: Service Workers
Product: Testing → Core

CI Results

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

Total 1 tests and 44 subtests

Status Summary

Firefox

OK : 1
PASS: 28
FAIL: 16

Chrome

OK : 1
PASS: 38
FAIL: 6

Safari

OK : 1
PASS: 28
FAIL: 16

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

/service-workers/service-worker/fetch-event.https.html
Service Worker responds to fetch event with the correct keepalive value: FAIL
XHR upload progress events for response coming from SW: FAIL

New Tests That Don't Pass

/service-workers/service-worker/fetch-event.https.html
FetchEvent#body is a ReadableStream: FAIL (Chrome: PASS, Safari: FAIL)
FetchEvent#body is a ReadableStream and is passed to network fallback: FAIL (Chrome: FAIL, Safari: FAIL)
FetchEvent#body is a ReadableStream, used and passed to network fallback: FAIL (Chrome: PASS, Safari: FAIL)
Service Worker responds to fetch event with the correct keepalive value: FAIL (Chrome: PASS, Safari: PASS)
FetchEvent#request.isReloadNavigation is true (location.reload()): FAIL (Chrome: FAIL, Safari: FAIL)
FetchEvent#request.isReloadNavigation is true (history.go(0)): FAIL (Chrome: FAIL, Safari: FAIL)
FetchEvent#request.isReloadNavigation is true (POST + location.reload()): FAIL (Chrome: FAIL, Safari: FAIL)
FetchEvent#request.isReloadNavigation is true (with history traversal): FAIL (Chrome: FAIL, Safari: FAIL)
FetchEvent#request.isHistoryNavigation is true (with history.go(-1)): FAIL (Chrome: PASS, Safari: FAIL)
FetchEvent#request.isHistoryNavigation is true (with history.go(1)): FAIL (Chrome: PASS, Safari: FAIL)
FetchEvent#request.isHistoryNavigation is false (with history.go(0)): FAIL (Chrome: PASS, Safari: FAIL)
FetchEvent#request.isHistoryNavigation is false (with location.reload): FAIL (Chrome: PASS, Safari: FAIL)
FetchEvent#request.isHistoryNavigation is true (with history.go(-2)): FAIL (Chrome: PASS, Safari: FAIL)
FetchEvent#request.isHistoryNavigation is true (with history.go(2)): FAIL (Chrome: PASS, Safari: FAIL)
FetchEvent#request.isHistoryNavigation is true (POST + history.go(-1)): FAIL (Chrome: PASS, Safari: FAIL)
XHR upload progress events for response coming from SW: FAIL (Chrome: PASS, Safari: PASS)

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4bd27f41c457 [wpt PR 27756] - Make streaming upload work with network fallback on service worker, a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.