Open Bug 2056083 Opened 1 month ago Updated 22 hours ago

[wpt-sync] Sync PR 61398 - Test the adoption agency when script reparents nodes during parsing

Categories

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

task

Tracking

()

People

(Reporter: wpt-sync, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

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

Test the adoption agency when script reparents nodes during parsing

The adoption agency algorithm moves existing nodes (the furthest block and its ancestors up to the common ancestor), assuming the DOM tree still matches the stack of open elements. An inline <script> that runs before the misnested end tag can reparent those nodes first — detaching them, moving them into another Document, or nesting them so that a subsequent move would create a cycle.

adoption-agency-reparenting.html covers the well-formed cases (detach, adopt into another Document, foster-parented common ancestor); these are interoperable across engines. The cycle-inducing cases are split into separate files (adoption-agency-reparenting-cycle.html and -inner-loop-cycle.html) so a crash in one does not hide the others; they currently crash Chromium.

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

CI Results

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

Total 227 tests and 14 subtests

Status Summary

Firefox

OK : 6[GitHub] 219[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 : 6[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 8[GitHub] 7707[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]
CRASH: 1
FAIL : 2[GitHub] 295[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]

Chrome

OK : 6
PASS : 10
CRASH: 1

Safari

OK : 6
PASS : 8
FAIL : 2
ERROR: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Crashes

New Tests That Don't Pass

  • /html/syntax/parsing/DOMContentLoaded-defer.html [wpt.fyi]: SKIP
  • /html/syntax/parsing/adoption-agency-reparenting-document-target.html [wpt.fyi]
    • Adoption agency foster target is a Document that already has an element child: FAIL (Chrome: PASS, Safari: FAIL)
  • /html/syntax/parsing/adoption-agency-reparenting-shadow-cycle.html [wpt.fyi]: CRASH (Chrome: OK, Safari: ERROR)
  • /html/syntax/parsing/adoption-agency-reparenting-template-cycle.html [wpt.fyi]
    • Adoption agency move that would create a host-including cycle via template contents: FAIL (Chrome: PASS, Safari: FAIL)
  • /html/syntax/parsing/cdata-in-integration-point-fragment.html [wpt.fyi]
    • CDATA not allowed when fragment-parsing with <mi> context (MathML text integration point): FAIL
    • CDATA not allowed when fragment-parsing with <mo> context (MathML text integration point): FAIL
    • CDATA not allowed when fragment-parsing with <mn> context (MathML text integration point): FAIL
    • CDATA not allowed when fragment-parsing with <ms> context (MathML text integration point): FAIL
    • CDATA not allowed when fragment-parsing with <mtext> context (MathML text integration point): FAIL
    • CDATA not allowed when fragment-parsing with <foreignObject> context (SVG HTML integration point): FAIL
    • CDATA not allowed when fragment-parsing with <desc> context (SVG HTML integration point): FAIL
    • CDATA not allowed when fragment-parsing with <title> context (SVG HTML integration point): FAIL
  • /html/syntax/parsing/doctype-system-identifier-distinction.html [wpt.fyi]
    • DOCTYPE with "-//W3C//DTD HTML 4.01 Frameset//" and empty system ID triggers quirks mode: FAIL
    • DOCTYPE with "-//W3C//DTD HTML 4.01 Transitional//" and empty system ID triggers quirks mode: FAIL
  • /html/syntax/parsing/html5lib_url.html?file=html5test-com [wpt.fyi]
    • <?import namespace="foo" implementation="#bar">: FAIL
  • /html/syntax/parsing/html5lib_url.html?file=adoption02 [wpt.fyi]
    • <nobr><table><marquee></table><nobr>: FAIL
  • /html/syntax/parsing/html5lib_url.html?file=tests1 [wpt.fyi]
    • <?: FAIL
    • <?COMMENT?>: FAIL
    • <?COM--MENT?>: FAIL
  • /html/syntax/parsing/html5lib_url.html?file=webkit02 [wpt.fyi]
    • <select><button><selectedcontent></button><option>X: FAIL
    • <select><button><selectedcontent></button><option>x<i>i<b>ib</i>b: FAIL
    • <select><button><selectedcontent></button><option>X<option>Y: FAIL
    • <select><button><selectedcontent></button><option>X<option selected>Y: FAIL
  • /html/syntax/parsing/html5lib_url.html?file=processing-instructions [wpt.fyi]
    • <body><?something>: FAIL
    • <body><?something><span>: FAIL
    • <body><?something good>: FAIL
    • <body><?something else is good>: FAIL
    • <body><?one><?two>: FAIL
    • <body><?a$><?b$><?good?>: FAIL
    • <body><?hey there?>: FAIL
    • <body><?hey there?>: FAIL
    • <body><?hey?there>: FAIL
    • <body><?hey\tthere=1?>: FAIL
    • <body><?hey\nthere=1?>: FAIL
    • <body><?hey\rthere=1?>: FAIL
    • <body><?hey\x0cthere=1?>: FAIL
    • <body><?something ? >: FAIL
    • <body><?something x >: FAIL
    • <body><?something ?\t ??>: FAIL
    • <body><?t d > ?>: FAIL
    • <body><?module-handler>: FAIL
    • <body><?module-handler data>: FAIL
    • <body><?view-port>: FAIL
    • <body><?view-port data>: FAIL
    • <body><?config-v2>: FAIL
    • <body><?config-v2 data>: FAIL
    • <body><?x>: FAIL
    • <body><?x data>: FAIL
    • <body><?zz2op>: FAIL
    • <body><?zz2op data>: FAIL
    • <body><?xla->: FAIL
    • <body><?xla- data>: FAIL
    • <body><?a-b-c>: FAIL
    • <body><?a-b-c data>: FAIL
    • <body><?v-123>: FAIL
    • <body><?v-123 data>: FAIL
    • <body><?a0-b1-c2>: FAIL
    • <body><?a0-b1-c2 data>: FAIL
    • <body><?page-404>: FAIL
    • <body><?page-404 data>: FAIL
    • <body><?r2-d2>: FAIL
    • <body><?r2-d2 data>: FAIL
    • <body><?level-99>: FAIL
    • <body><?level-99 data>: FAIL
    • <body><?UPPERCASE>: FAIL
    • <body><?UPPERCASE data>: FAIL
    • <body><?all-KINDS-of-CaSeS>: FAIL
    • <body><?all-KINDS-of-CaSeS data>: FAIL
    • <body><?user_name>: FAIL
    • <body><?user_name data>: FAIL
    • <body><?S_S-S_S>: FAIL
    • <body><?S_S-S_S data>: FAIL
    • <body><?b_>: FAIL
    • <body><?b_ data>: FAIL
    • <body><?_prefix>: FAIL
    • <body><?_prefix data>: FAIL
    • <body><?_x132>: FAIL
    • <body><?_x132 data>: FAIL
    • <body><?->: FAIL
    • <body><?- data>: FAIL
    • <body><?_>: FAIL
    • <body><?_ data>: FAIL
    • <body><?A---------------->: FAIL
    • <body><?A---------------- data>: FAIL
    • <body><?z0123456789>: FAIL
    • <body><?z0123456789 data>: FAIL
    • <body><?m-0>: FAIL
    • <body><?m-0 data>: FAIL
    • <body><?start: FAIL
    • <body><?start?: FAIL
    • <body><?start : FAIL
    • <body><?start data: FAIL
    • <body><?start ? ?: FAIL
    • <body><?: FAIL
    • <div><?something></div>: FAIL
    • <div><?something good></div>: FAIL
    • <table><?something></table>: FAIL
    • <table><tr><?something></tr></table>: FAIL
    • <?something>: FAIL
    • <head><?something>: FAIL
    • <html><?something><head>: FAIL
    • <html><head></head><?something><body>: FAIL
    • <html><body></body><?something>: FAIL
    • <html><body></body></html><?something>: FAIL
    • <body><template><?something></template>: FAIL
    • <template><?pi>: FAIL
  • /html/syntax/parsing/html5lib_write.html?file=tests1 [wpt.fyi]
    • <?: FAIL
    • <?COMMENT?>: FAIL
    • <?COM--MENT?>: FAIL
  • /html/syntax/parsing/html5lib_write.html?file=adoption02 [wpt.fyi]
    • <nobr><table><marquee></table><nobr>: FAIL
  • /html/syntax/parsing/html5lib_write.html?file=webkit02 [wpt.fyi]
    • <select><button><selectedcontent></button><option>X: FAIL
    • <select><button><selectedcontent></button><option>x<i>i<b>ib</i>b: FAIL
    • <select><button><selectedcontent></button><option>X<option>Y: FAIL
    • <select><button><selectedcontent></button><option>X<option selected>Y: FAIL
  • /html/syntax/parsing/html5lib_write.html?file=processing-instructions [wpt.fyi]
    • <body><?something>: FAIL
    • <body><?something><span>: FAIL
    • <body><?something good>: FAIL
    • <body><?something else is good>: FAIL
    • <body><?one><?two>: FAIL
    • <body><?a$><?b$><?good?>: FAIL
    • <body><?hey there?>: FAIL
    • <body><?hey there?>: FAIL
    • <body><?hey?there>: FAIL
    • <body><?hey\tthere=1?>: FAIL
    • <body><?hey\nthere=1?>: FAIL
    • <body><?hey\rthere=1?>: FAIL
    • <body><?hey\x0cthere=1?>: FAIL
    • <body><?something ? >: FAIL
    • <body><?something x >: FAIL
    • <body><?something ?\t ??>: FAIL
    • <body><?t d > ?>: FAIL
    • <body><?module-handler>: FAIL
    • <body><?module-handler data>: FAIL
    • <body><?view-port>: FAIL
    • <body><?view-port data>: FAIL
    • <body><?config-v2>: FAIL
    • <body><?config-v2 data>: FAIL
    • <body><?x>: FAIL
    • <body><?x data>: FAIL
    • <body><?zz2op>: FAIL
    • <body><?zz2op data>: FAIL
    • <body><?xla->: FAIL
    • <body><?xla- data>: FAIL
    • <body><?a-b-c>: FAIL
    • <body><?a-b-c data>: FAIL
    • <body><?v-123>: FAIL
    • <body><?v-123 data>: FAIL
    • <body><?a0-b1-c2>: FAIL
    • <body><?a0-b1-c2 data>: FAIL
    • <body><?page-404>: FAIL
    • <body><?page-404 data>: FAIL
    • <body><?r2-d2>: FAIL
    • <body><?r2-d2 data>: FAIL
    • <body><?level-99>: FAIL
    • <body><?level-99 data>: FAIL
    • <body><?UPPERCASE>: FAIL
    • <body><?UPPERCASE data>: FAIL
    • <body><?all-KINDS-of-CaSeS>: FAIL
    • <body><?all-KINDS-of-CaSeS data>: FAIL
    • <body><?user_name>: FAIL
    • <body><?user_name data>: FAIL
    • <body><?S_S-S_S>: FAIL
    • <body><?S_S-S_S data>: FAIL
    • <body><?b_>: FAIL
    • <body><?b_ data>: FAIL
    • <body><?_prefix>: FAIL
    • <body><?_prefix data>: FAIL
    • <body><?_x132>: FAIL
    • <body><?_x132 data>: FAIL
    • <body><?->: FAIL
    • <body><?- data>: FAIL
    • <body><?_>: FAIL
    • <body><?_ data>: FAIL
    • <body><?A---------------->: FAIL
    • <body><?A---------------- data>: FAIL
    • <body><?z0123456789>: FAIL
    • <body><?z0123456789 data>: FAIL
    • <body><?m-0>: FAIL
    • <body><?m-0 data>: FAIL
    • <body><?start: FAIL
    • <body><?start?: FAIL
    • <body><?start : FAIL
    • <body><?start data: FAIL
    • <body><?start ? ?: FAIL
    • <body><?: FAIL
    • <div><?something></div>: FAIL
    • <div><?something good></div>: FAIL
    • <table><?something></table>: FAIL
    • <table><tr><?something></tr></table>: FAIL
    • <?something>: FAIL
    • <head><?something>: FAIL
    • <html><?something><head>: FAIL
    • <html><head></head><?something><body>: FAIL
    • <html><body></body><?something>: FAIL
    • <html><body></body></html><?something>: FAIL
    • <body><template><?something></template>: FAIL
    • <template><?pi>: FAIL
  • /html/syntax/parsing/html5lib_write.html?file=html5test-com [wpt.fyi]
    • <?import namespace="foo" implementation="#bar">: FAIL
  • /html/syntax/parsing/html5lib_write_single.html?file=webkit02 [wpt.fyi]
    • <select><button><selectedcontent></button><option>X: FAIL
    • <select><button><selectedcontent></button><option>x<i>i<b>ib</i>b: FAIL
    • <select><button><selectedcontent></button><option>X<option>Y: FAIL
    • <select><button><selectedcontent></button><option>X<option selected>Y: FAIL
  • /html/syntax/parsing/html5lib_write_single.html?file=tests19 [wpt.fyi]
    • <!doctype html><table> b <!--foo-->: FAIL
  • /html/syntax/parsing/html5lib_write_single.html?file=adoption02 [wpt.fyi]
    • <nobr><table><marquee></table><nobr>: FAIL
  • /html/syntax/parsing/html5lib_write_single.html?file=processing-instructions [wpt.fyi]
    • <body><?something>: FAIL
    • <body><?something><span>: FAIL
    • <body><?something good>: FAIL
    • <body><?something else is good>: FAIL
    • <body><?one><?two>: FAIL
    • <body><?a$><?b$><?good?>: FAIL
    • <body><?hey there?>: FAIL
    • <body><?hey there?>: FAIL
    • <body><?hey?there>: FAIL
    • <body><?hey\tthere=1?>: FAIL
    • <body><?hey\nthere=1?>: FAIL
    • <body><?hey\rthere=1?>: FAIL
    • <body><?hey\x0cthere=1?>: FAIL
    • <body><?something ? >: FAIL
    • <body><?something x >: FAIL
    • <body><?something ?\t ??>: FAIL
    • <body><?t d > ?>: FAIL
    • <body><?module-handler>: FAIL
    • <body><?module-handler data>: FAIL
    • <body><?view-port>: FAIL
    • <body><?view-port data>: FAIL
    • <body><?config-v2>: FAIL
    • <body><?config-v2 data>: FAIL
    • <body><?x>: FAIL
    • <body><?x data>: FAIL
    • <body><?zz2op>: FAIL
    • <body><?zz2op data>: FAIL
    • <body><?xla->: FAIL
    • <body><?xla- data>: FAIL
    • <body><?a-b-c>: FAIL
    • <body><?a-b-c data>: FAIL
    • <body><?v-123>: FAIL
    • <body><?v-123 data>: FAIL
    • <body><?a0-b1-c2>: FAIL
    • <body><?a0-b1-c2 data>: FAIL
    • <body><?page-404>: FAIL
    • <body><?page-404 data>: FAIL
    • <body><?r2-d2>: FAIL
    • <body><?r2-d2 data>: FAIL
    • <body><?level-99>: FAIL
    • <body><?level-99 data>: FAIL
    • <body><?UPPERCASE>: FAIL
    • <body><?UPPERCASE data>: FAIL
    • <body><?all-KINDS-of-CaSeS>: FAIL
    • <body><?all-KINDS-of-CaSeS data>: FAIL
    • <body><?user_name>: FAIL
    • <body><?user_name data>: FAIL
    • <body><?S_S-S_S>: FAIL
    • <body><?S_S-S_S data>: FAIL
    • <body><?b_>: FAIL
    • <body><?b_ data>: FAIL
    • <body><?_prefix>: FAIL
    • <body><?_prefix data>: FAIL
    • <body><?_x132>: FAIL
    • <body><?_x132 data>: FAIL
    • <body><?->: FAIL
    • <body><?- data>: FAIL
    • <body><?_>: FAIL
    • <body><?_ data>: FAIL
    • <body><?A---------------->: FAIL
    • <body><?A---------------- data>: FAIL
    • <body><?z0123456789>: FAIL
    • <body><?z0123456789 data>: FAIL
    • <body><?m-0>: FAIL
    • <body><?m-0 data>: FAIL
    • <body><?start: FAIL
    • <body><?start?: FAIL
    • <body><?start : FAIL
    • <body><?start data: FAIL
    • <body><?start ? ?: FAIL
    • <body><?: FAIL
    • <div><?something></div>: FAIL
    • <div><?something good></div>: FAIL
    • <table><?something></table>: FAIL
    • <table><tr><?something></tr></table>: FAIL
    • <?something>: FAIL
    • <head><?something>: FAIL
    • <html><?something><head>: FAIL
    • <html><head></head><?something><body>: FAIL
    • <html><body></body><?something>: FAIL
    • <html><body></body></html><?something>: FAIL
    • <body><template><?something></template>: FAIL
    • <template><?pi>: FAIL
  • /html/syntax/parsing/html5lib_write_single.html?file=tests7 [wpt.fyi]
    • A<table><tr> B</tr> B</table>: FAIL
    • A<table><tr> B</tr> </em>C</table>: FAIL
  • /html/syntax/parsing/html5lib_write_single.html?file=html5test-com [wpt.fyi]
    • <?import namespace="foo" implementation="#bar">: FAIL
  • /html/syntax/parsing/html5lib_write_single.html?file=tests1 [wpt.fyi]
    • <?: FAIL
    • <?COMMENT?>: FAIL
    • <?COM--MENT?>: FAIL
  • /html/syntax/parsing/html5lib_write_single.html?file=tests15 [wpt.fyi]
    • <!doctype html><table> X<meta></table>: FAIL
    • <!doctype html><table> x</table>: FAIL
    • <!doctype html><table> x </table>: FAIL
    • <!doctype html><table><tr> x</table>: FAIL

Tests Disabled in Gecko Infrastructure

Component: DOM: Core & HTML → DOM: HTML Parser

Fixing bug 2064077 is likely to fix the crashes here.

See Also: → 2064077
You need to log in before you can comment on or make changes to this bug.