Closed Bug 1779159 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 34799 - Streaming upload with service workers

Categories

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

task

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Yutaka Hirano <yhirano@chromium.org> wrote:

Streaming upload with service workers

For usual requests, content::ServiceWorkerSubresourceLoader stores the request body and use it when the fetch event was not handled in the service worker ("network fallback"). This is possible because the request body is copyable. That is not the case for streaming request
bodies - they are not copyable.

With this change, the service worker brings the streaming request body to the ServiceWorkerSubresourceLoader via the OnFallback mojom
message, so that it can attach the body to the network fallback request without copying the entire body.

Bug: 1165690
Change-Id: I5f11e770c3c1a8dc83534ec7a39fdfefc69dd648

Reviewed-on: https://chromium-review.googlesource.com/3752192
WPT-Export-Revision: 53ed04f3b3bfd332cd4839880ba177defe1255c3

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

CI Results

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

Total 3 tests and 43 subtests

Status Summary

Firefox

OK : 3
PASS: 32
FAIL: 20

Chrome

OK : 3
PASS: 43
FAIL: 9

Safari

OK : 3
PASS: 33
FAIL: 19

Links

GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

New Tests That Don't Pass

  • /service-workers/service-worker/fetch-event-referrer-policy.https.html [wpt.fyi]
    • Service Worker responds to fetch event with the referrer policy: FAIL (Chrome: FAIL, Safari: FAIL)
  • /service-workers/service-worker/fetch-event.https.h2.html [wpt.fyi]
    • The streaming request body is readable in the service worker.: FAIL (Chrome: FAIL, Safari: FAIL)
    • Network fallback for streaming upload.: FAIL (Chrome: PASS, Safari: FAIL)
    • When the streaming request body is used, network fallback fails.: FAIL (Chrome: PASS, Safari: FAIL)
    • Running clone() in the service worker does not prevent network fallback.: FAIL (Chrome: FAIL, Safari: FAIL)
  • /service-workers/service-worker/fetch-event.https.html [wpt.fyi]
    • FetchEvent#body is a ReadableStream: FAIL (Chrome: FAIL, Safari: FAIL)
    • FetchEvent#body is a none Uint8Array ReadableStream and is passed to a service worker: 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/df5a0f341876 [wpt PR 34799] - Streaming upload with service workers, a=testonly https://hg.mozilla.org/integration/autoland/rev/b4aeab428332 [wpt PR 34799] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in before you can comment on or make changes to this bug.