Closed Bug 1898631 Opened 9 months ago Closed 9 months ago

[wpt-sync] Sync PR 46464 - [shared storage] Move the opaque origin check to each SharedStorage method

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox128 fixed)

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Yao Xiao <yaoxia@chromium.org> wrote:

[shared storage] Move the opaque origin check to each SharedStorage method

Currently, we throw an error when accessing window.sharedStorage in an
opaque origin context. This deviates from the specification, which
specifies to throw an error for opaque origins within each method.

We fix the code to align with the specification. The validation
at mojom boundary is also moved to each method. This requires
SharedStorageWorkletDevToolsAgentHostTest to update the page
origin to https scheme.

This also begins to address the ambiguity around whether
sharedStorage.createWorklet(url) should be permitted in opaque origin
contexts. By relocating the check, we create flexibility for
potential future relaxation of these constraints.

Bug: 342197901
Change-Id: Ie1583b341148681be202eeae39810cbfac546de9

Reviewed-on: https://chromium-review.googlesource.com/5560723
WPT-Export-Revision: 8dd2c34b6528dc4707c4ed7d67d0205b5369114f

CI Results

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

Total 1 tests and 6 subtests

Status Summary

Firefox

OK : 1
PASS: 3
FAIL: 3

Chrome

OK : 1
PASS: 4
FAIL: 2

Safari

OK : 1
PASS: 3
FAIL: 3

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /shared-storage/shared-storage-in-sandboxed-iframe.tentative.https.html [wpt.fyi]
    • test sharedStorage.set() in sandboxed iframe with "allow-same-origin": FAIL (Chrome: PASS, Safari: FAIL)
    • test sharedStorage.createWorklet() in sandboxed iframe with "allow-same-origin": FAIL (Chrome: FAIL, Safari: FAIL)
    • test sharedStorage.worklet.addModule() in sandboxed iframe with "allow-same-origin": FAIL (Chrome: FAIL, Safari: FAIL)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f5673dbff53a [wpt PR 46464] - [shared storage] Move the opaque origin check to each SharedStorage method, a=testonly
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
You need to log in before you can comment on or make changes to this bug.