Skip to content

Conversation

@theIDinside
Copy link
Contributor

@theIDinside theIDinside commented Nov 24, 2025

Test written for the redacted location.ancestorOrigins spec.

Addresses all examples described in the PR for the spec in whatwg/html#11560.

Filed as a PR here because it was requested by @domfarolino to be able to comment on it.

Beyond the requested tag of loosening/tightening policy as requested by @domfarolino also added that doing this, should not affect grandchildren.

Test cases written in a declarative fashion:
description, frames: { name, src, iframeReferrerPolicy, options }[] , expected: string []

options is an object of: { sandbox?, target?, action?, value? }

Used to configure if the iframe should have the sandbox attribute.

target && action && value is used to configure an iframe with a new attribute, or do something inside of a frame (target), like inserting a meta element.

The reason for there being 3 iframes, instead of just 2, is to avoid changing anything in the top level document, which could potentially affect subsequent tests after it. This way, tear down is clean and simple between test cases.

@theIDinside theIDinside force-pushed the redacted-ancestor-origins-tests branch from 1357a38 to b81b1b0 Compare December 4, 2025 13:20
- Tests toggling of 'masked' in the algorithm.
- Tests mutating policy on iframe and then having a grandchild browsing
context be created.
- Tests sandboxing so that all origins become null below it.
@theIDinside theIDinside force-pushed the redacted-ancestor-origins-tests branch from b81b1b0 to 2d6e76c Compare December 5, 2025 14:38
@theIDinside
Copy link
Contributor Author

@domfarolino && @zcorpan

I added about:blank tests to this WPT, as they were useful when implementing this feature in Gecko. Technically, from a spec perspective an about:blank or a normal document aren't different, but there could be implementation details that can make these tests useful. Should we keep it or should I move it to a gecko-only repo?

@zcorpan
Copy link
Member

zcorpan commented Dec 8, 2025

Let's keep the about:blank tests in wpt.

@zcorpan
Copy link
Member

zcorpan commented Dec 8, 2025

Marking this do not merge yet because these will land via Gecko.

@zcorpan
Copy link
Member

zcorpan commented Dec 11, 2025

wpt sync PR #56685

@zcorpan zcorpan closed this Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants