Skip to content

Strengthen and extend selectedcontent omitted-subtree tests - #66135

Open
zcorpan wants to merge 3 commits into
web-platform-tests:masterfrom
zcorpan:zcorpan/spec-review/html-13320/d2
Open

zcorpan wants to merge 3 commits into
web-platform-tests:masterfrom
zcorpan:zcorpan/spec-review/html-13320/d2

Conversation

@zcorpan

@zcorpan zcorpan commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

selectedcontent-does-not-clone-omitted-subtrees.html only checked that no extra custom elements were constructed, so it passed in browsers that don't clone options into <selectedcontent> at all, e.g. Firefox Nightly on wpt.fyi, where customizable select is disabled by default. This adds checks that the option's children, its clonable shadow tree, and the newly selected option are cloned.

It also adds tests for script, SVG script, frame, iframe, embed, and object as children of the option and nested deeper, for the options of a select with multiple, and for omitted elements in template contents, which are kept.

For whatwg/html#13320.

The tests only checked that no extra custom elements were constructed, so
they passed in browsers that don't clone options into `selectedcontent`.

Review-item: D2
Test `script`, SVG `script`, `frame`, `iframe`, `embed`, and `object` as children
of the option and nested deeper, the options of a `select` with `multiple`, and
omitted elements in template contents, which are kept.

Review-item: D1
@zcorpan zcorpan changed the title Check that selectedcontent clones the option in omitted-subtree tests Strengthen and extend selectedcontent omitted-subtree tests Dec 4, 2026
@zcorpan
zcorpan requested a review from noamr December 4, 2026 10:34
Add a help link for the exclusion check, rename subtests to say they omit the
elements too, rename `OMITTED` to `omitted` as in the neighboring test, wrap long
lines, and simplify the helper and its comment.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants