Closed Bug 2091189 Opened 19 days ago Closed 8 days ago

[wpt-sync] Sync PR 64914 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=330620

Categories

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

task

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Anne van Kesteren <annevk@annevk.nl> wrote:

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=330620

WebKit export from bug: Determine a document'<!---->s origin in one function

<pre>
Determine a document's origin in one function

Add SecurityPolicy::determineOrigin(), HTML's "determining the origin" given a
URL, sandboxing flags, and a source origin, and use it in
Document::initSecurityContext() and computeResponseOriginAndCOOP(). This is a
step toward taking about:blank's origin from the navigation's initiator and
from session history.

No change in behavior. The source is still the parent or opener, and the
requester for COOP, and any CSP sandbox flags still make a response's origin
opaque for COOP (now a FIXME). An inheriting document now gets a
SecurityOriginPolicy of its own around its owner's SecurityOrigin rather than
sharing its owner's policy; the origin is still shared, so document.domain
still affects both.

Also add WPT tests for about:blank navigated by neither its parent nor its
opener, which pass and fail the same before and after this change. With site
isolation some of their cross-site variants hit a Debug assertion, so skip those
there: about:blank loads in its initiator's process, but the UI process gives
it its parent's or opener's origin.

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=330620">https://bugs.webkit.org/show_bug.cgi?id=330620</a>
</pre>

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

CI Results

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

Total 25 tests and 1 subtests

Status Summary

Firefox

OK : 20[GitHub] 25[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 72[GitHub] 77[Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 78[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug]
FAIL: 1

Chrome

OK : 20
PASS: 66
FAIL: 7

Safari

OK : 20
PASS: 19
FAIL: 54

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /html/browsers/origin/inheritance/about-blank-iframe-navigated-by-ancestor.window.html?cross-site&1-4 [wpt.fyi]
    • about:blank shares its origin with the initiator, so document.domain affects both: FAIL [Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt, GitHub], PASS [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug] (Chrome: FAIL, Safari: FAIL)
Status: NEW → RESOLVED
Closed: 8 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.