Closed Bug 1780841 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 34941 - Policy container inheritance for service workers

Categories

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

task

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream error])

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

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

Jonathan Hao <phao@chromium.org> wrote:

Policy container inheritance for service workers

Project: https://docs.google.com/document/d/1mAuxWRLcmhghtCoapc30nLo0H12XTMZUJWqw079XOR8/edit?hl=en&forcehl=1

This is the part about service worker.

Attach a PolicyContainerHost to ServiceWorkerVersion. This PolicyContainerHost is obtained:

  • for local schemes by cloning the creator’s PolicyContainerHost (the creator is the RenderFrameHost identified by requesting_frame_id_)
  • for network schemes by parsing the policies from the response headers inside ServiceWorkerNewScriptLoader::OnReceiveResponse

The policy container is then passed down to renderer and set as the execution context's policy container.

This CL fixes external/wpt/html/cross-origin-embedder-policy/reflection-credentialless.tentative.https.any.serviceworker.html and external/wpt/html/cross-origin-embedder-policy/reflection-require-corp.tentative.https.any.serviceworker.html because the passed down policy container contains the correct COEP.

Follow-ups: merge CSPs into our policy container.

Bug: 1177199
Change-Id: Ie90c02b8dd3e295c5456e7e2ff03685339277d6a
Reviewed-on: https://chromium-review.googlesource.com/3766681
WPT-Export-Revision: b26412879c4f210848e5bec0c820eecd23dca2cf

Component: web-platform-tests → DOM: Core & HTML
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 18 tests and 1 subtests

Status Summary

Firefox

OK : 12
FAIL : 12
TIMEOUT: 3
ERROR : 3

Chrome

OK : 18
FAIL : 18

Safari

OK : 18
FAIL : 18

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/971cb511fb8e [wpt PR 34941] - Policy container inheritance for service workers, a=testonly https://hg.mozilla.org/integration/autoland/rev/c43d669403d0 [wpt PR 34941] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
You need to log in before you can comment on or make changes to this bug.