Closed Bug 1943294 Opened 1 month ago Closed 25 days ago

[wpt-sync] Sync PR 50236 - [DIP] Plumb DIP reporter into ServiceWorker

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Camille Lamy <clamy@chromium.org> wrote:

[DIP] Plumb DIP reporter into ServiceWorker

This CL ensures that CORP checks handled by ServiceWorkers and that
fails due to DocumentIsolationPolicy are properly reported to an
appropriate DocumentIsolationPolicyReporter. To do so, it creates a
DocumentIsolationPolicy reporter in the EmbeddedWorkerInstance based on
the DocumentIsolationPolicy passed to the worker.

The DocumentIsolationPolicy reporter and COEP reporter are then
connected to ReportingObservers in the renderer process that are bound
when the WorkerGlobalScope is initialized. This CL updates how this is
currently done for COEP reporter, so that it happens through the
GlobalScopeCreationParams instead of the specific
ServiceWorkerGlobalScope. This will allow to reuse it for COEP and
DocumentIsolationPolicy reporters in DedicatedWorkers and SharedWorkers.

This CL also fixes an issue where DocumentIsolationPolicy was not passed
to the ServiceWorker and was not taken into account for CORP checks
triggered by the ServiceWorker.

The exception for using a non-Blink version of DocumentIsolationPolicy
in the ServiceWorker's CrossOriginResourcePolicyChecker was approved in
https://groups.google.com/a/chromium.org/g/platform-architecture-dev/c/kB9rcdFdIUE/m/IirIrk2nCwAJ.

This CL is part of a chain of CLs implementing DocumentIsolationPolicy
reporting:

  1. Add DocumentIsolationPolicyReporter
  2. Implement DocumentIsolationPolicyReporter
  3. Pass the reporter to URLloaderFactory
  4. Plumb DIP reporter into ServiceWorkers \<- you are here
  5. Add a DIP reporter to DedicatedWorker
  6. Add a DIP reporter to SharedWorker
  7. Plumb DIP reporter in CacheStorage

Bug: 333029815
Change-Id: I9b3a873867f01c5200be31b50e02687aa30314e8
Reviewed-on: https://chromium-review.googlesource.com/6088945
WPT-Export-Revision: 9a02ef654492ea369e042b66a677c4262d31187d

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

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

Total 1 tests and 9 subtests

Status Summary

Firefox

PASS : 2
TIMEOUT: 2
NOTRUN : 6

Chrome

PASS : 2
TIMEOUT: 2
NOTRUN : 6

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /html/document-isolation-policy/reporting-subresource-corp.tentative.https.html [wpt.fyi]: TIMEOUT (Chrome: TIMEOUT)
    • [document] blocked due to DIP: TIMEOUT (Chrome: TIMEOUT)
    • [document] blocked during redirect: NOTRUN (Chrome: NOTRUN)
    • [between service worker and page] same-origin: NOTRUN (Chrome: NOTRUN)
    • [between service worker and page] blocked by CORP: same-origin: NOTRUN (Chrome: NOTRUN)
    • [between service worker and page] blocked due to DIP: NOTRUN (Chrome: NOTRUN)
    • [between service worker and page] blocked during redirect: NOTRUN (Chrome: NOTRUN)
    • destination: script: NOTRUN (Chrome: NOTRUN)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1ce84232a066 [wpt PR 50236] - [DIP] Plumb DIP reporter into ServiceWorker, a=testonly
Status: NEW → RESOLVED
Closed: 25 days ago
: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
You need to log in before you can comment on or make changes to this bug.