Closed Bug 1788850 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 35760 - CacheStorage now keeps the fragment in the Request URL but doesn't save it in the Cache key.

Categories

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

task

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Etienne Noel <etiennenoel@google.com> wrote:

CacheStorage now keeps the fragment in the Request URL but doesn't save it in the Cache key.

The Cache storage now keeps in the Request Metadata, the complete URL (including the fragment). However, when doing the match, the fragment part is removed. This means that these 3 example URLs will all match:

https://example.com/path
https://example.com/path#ref
https://example.com/path#ref2

The latest url put in the cache will be the one saved and returned in the Request.

This CL modified the following:

  • third_party/blink/renderer/core/fetch/request.h

The removeFragment parameter was added to the CreateFetchAPIRequest( bool removeFragment = true) and by default, for retro-compatibility reasons, the fragment is removed.

Once we are certain that always keeping the fragment doesn't cause any side-effects, we can change this behaviour and just remove the code that was removing the fragment.

  • Methods to support manipulating fragments (ref) and their unit tests were also added.

  • The cache now saves the url in the request metadata so modifications to the proto file were made.

Bug:1205111
Change-Id: Ib23fd5a9364bc64159a2859dc9fd9d3512697202
Reviewed-on: https://chromium-review.googlesource.com/3859817
WPT-Export-Revision: 89bb5fb9deabb05625546ae0d461c06ca584223a

Component: web-platform-tests → DOM: Service Workers
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]

CI Results

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

Total 4 tests and 27 subtests

Status Summary

Firefox

OK : 4
PASS: 104
FAIL: 4

Chrome

OK : 4
PASS: 104
FAIL: 4

Safari

OK : 4
PASS: 104
FAIL: 4

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8bdea73fcf6c [wpt PR 35760] - CacheStorage now keeps the fragment in the Request URL but doesn't save it in the Cache key., a=testonly
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
You need to log in before you can comment on or make changes to this bug.