wpt icon indicating copy to clipboard operation
wpt copied to clipboard

Add tests for redacted location.ancestorOrigins https://github.com/whatwg/html/pull/11560

Open theIDinside opened this issue 3 months ago • 3 comments

Test written for the redacted location.ancestorOrigins spec.

Addresses all examples described in the PR for the spec in https://github.com/whatwg/html/pull/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 avatar Nov 24 '25 14:11 theIDinside

@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?

theIDinside avatar Dec 05 '25 14:12 theIDinside

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

zcorpan avatar Dec 08 '25 11:12 zcorpan

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

zcorpan avatar Dec 08 '25 15:12 zcorpan

wpt sync PR https://github.com/web-platform-tests/wpt/pull/56685

zcorpan avatar Dec 11 '25 15:12 zcorpan