Skip to content

Add <template for> tests - #65568

Open
hjanuschka wants to merge 3 commits into
web-platform-tests:masterfrom
hjanuschka:template-for-review-tests
Open

hjanuschka wants to merge 3 commits into
web-platform-tests:masterfrom
hjanuschka:template-for-review-tests

Conversation

@hjanuschka

@hjanuschka hjanuschka commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Tests for <template for> (whatwg/html#11818): patching edge cases (re-entrancy, custom element timing, text node merging, scopes, aborts, iframes, NUL in PI data), duplicate and mutated marker names, and a guard against O(n^2) marker lookup - the last two from https://chromium-review.googlesource.com/c/chromium/src/+/8860735.

Also fixes two existing tests: template-for-move-cross-document asserted around its own inserted script, and template-for-only-html-001 was missing its xhtml resource.

Passing in the in-progress Chromium and Firefox implementations, except PI setAttribute and the dynamic-markup-insertion guard, which Firefox doesn't implement yet.

@hjanuschka
hjanuschka force-pushed the template-for-review-tests branch from 05513c6 to db7ec3a Compare November 21, 2026 12:05
@hjanuschka hjanuschka changed the title Add <template for> tests from WebKit review, fix two test issues Add <template for> tests, fix two existing tests Nov 21, 2026
Cover prepare content patching re-entrancy, custom element timing,
text node merging, shadowrootmode precedence, body scope widening,
mid-stream style invalidation, parse aborts, NUL in PI data, and
iframes in patches.

template-for-move-cross-document asserted around its own inserted
script; template-for-only-html-001 was missing
resources/template-for.xhtml.
@hjanuschka
hjanuschka force-pushed the template-for-review-tests branch from db7ec3a to e0a57b0 Compare November 24, 2026 01:11
From https://chromium-review.googlesource.com/c/chromium/src/+/8860735:
duplicate markers across lookup scopes, reordering duplicates
mid-stream, mutating marker names via data and setAttribute, and a
guard against O(n^2) patch target lookup in large documents.
@hjanuschka hjanuschka changed the title Add <template for> tests, fix two existing tests Add <template for> tests Nov 25, 2026

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