From 1d53b3811edc2c898055bb75406b272ef61dba2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Wang=20N=C3=A9lar?= Date: Wed, 22 Jul 2026 09:55:23 -0700 Subject: [PATCH] Expose RequestDestination "compression-dictionary" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, Chromium uses "dictionary" as an internal destination. Align Chromium with spec PR [1], which uses string "compression-dictionary" instead. This is a web-exposed behavior change, so do that under a runtime flag. Also add a WPT test to check the new value, a more complex one is added in [2]. [1] https://github.com/whatwg/fetch/pull/1854 [2] https://chromium-review.googlesource.com/c/chromium/src/+/8129944 NO_IFTTT=Both files updated, but the IfThen labels were wrong. Bug: 522338661, 40255884 Change-Id: I54b2047492ebc4d410351a83a10de8d0249b4b3a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8086393 Reviewed-by: Patrick Meenan Commit-Queue: Frédéric Wang Nélar Reviewed-by: Andrea Orru Reviewed-by: Josh Karlin Reviewed-by: Takashi Toyoshima Reviewed-by: Benoit Lize Reviewed-by: Matthew Denton Reviewed-by: Ben Kelly Cr-Commit-Position: refs/heads/main@{#1666398} --- .../fetch-destination.tentative.https.html | 45 +++++++++++++++++++ .../resources/fetch-options-worker.js | 2 + 2 files changed, 47 insertions(+) create mode 100644 fetch/compression-dictionary/fetch-destination.tentative.https.html diff --git a/fetch/compression-dictionary/fetch-destination.tentative.https.html b/fetch/compression-dictionary/fetch-destination.tentative.https.html new file mode 100644 index 00000000000000..41168cd4d10833 --- /dev/null +++ b/fetch/compression-dictionary/fetch-destination.tentative.https.html @@ -0,0 +1,45 @@ + +Fetch destination test for compression-dictionary + + + + + + diff --git a/fetch/compression-dictionary/resources/fetch-options-worker.js b/fetch/compression-dictionary/resources/fetch-options-worker.js index 1fff3e11afc020..8782e2c01e91d9 100644 --- a/fetch/compression-dictionary/resources/fetch-options-worker.js +++ b/fetch/compression-dictionary/resources/fetch-options-worker.js @@ -2,11 +2,13 @@ self.addEventListener('fetch', function(event) { if (event.request.url.includes('dummy')) { const params = new URL(event.request.url).searchParams; const credentials = params.get("credentials"); + const destination = params.get('destination'); const mode = params.get("mode"); const integrity = params.get('integrity'); const referrer = params.get('referrer'); const referrerPolicy = params.get('referrerPolicy'); if ((credentials === null || credentials == event.request.credentials) && + (destination === null || destination == event.request.destination) && (mode === null || mode == event.request.mode) && (integrity === null || integrity == event.request.integrity) && (referrer === null || referrer == event.request.referrer) &&