Closed Bug 1853375 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 41976 - [fetch-later] Fix a bug FetchLater request not sent on unload

Categories

(Core :: DOM: Networking, task, P4)

task

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox120 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Ming-Ying Chung <mych@chromium.org> wrote:

[fetch-later] Fix a bug FetchLater request not sent on unload

FetchLater is a new API still behind a flag. See the attached bug for explainers and more details.

This is extracted from https://crrev.com/c/4803083 to make it
simpler.

There are two issues fixed by this CL:

  1. VirtualTestSuites didn't enable base kFetchLaterAPI feature,
    which make a FetchLater request handled by old mechanism,
    i.e., it was treated as a normal keepalive request, in
    virtual WPTs.
  2. FetchLater requests are not cleaned up by blink::ResourceLoader,
    such that KeepAliveURLLoaderService in browser not aware of
    the disconnection of its URLLoader for a FetchLater when a
    page is unloaded.

The abort-related failure in send-on-discard WPT is expected as it's not implemented ATM, and will be fixed in subsequent CL.

Bug: 1465781
Change-Id: Ia4aebb993b309e85f7fe9874ddf20f5b5c041e78
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4866000
Reviewed-by: Xianzhu Wang \<wangxianzhu@chromium.org>
Commit-Queue: Ming-Ying Chung \<mych@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1196690}

Component: web-platform-tests → DOM: Networking
Product: Testing → Core

CI Results

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

Total 1 tests

Status Summary

Firefox

ERROR: 1

Chrome

ERROR: 1

Safari

ERROR: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/290a281d2d83 [wpt PR 41976] - [fetch-later] Fix a bug FetchLater request not sent on unload, a=testonly https://hg.mozilla.org/integration/autoland/rev/47b7444d7e5a [wpt PR 41976] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
You need to log in before you can comment on or make changes to this bug.