Align the test's expectation with the latest spec.#58514
Merged
rniwa merged 1 commit intoweb-platform-tests:masterfrom Mar 16, 2026
Merged
Conversation
To "prepare the script element" [1] exits early when the element is disconnected. In this test, the script element represented by frag_script_2 which logs "inline script #3" is disconnected in the preceeding script (frag_script_1 / "inline script #2"). Since post-connection steps [2] are executed in the tree order, by the time we are to "prepare the script element" on frag_script_2 / "inline script #3", the script element is already disconnected and the script will not be executed. This test failing in Chrome and Safari but passing in Firefox. After the change, the test passes in Chrome and Safari and fails in Firefox. [1] https://html.spec.whatwg.org/multipage/scripting.html#prepare-the-script-element [2] https://dom.spec.whatwg.org/#concept-node-post-connection-ext
annevk
approved these changes
Mar 16, 2026
Member
annevk
left a comment
There was a problem hiding this comment.
@smaug---- FYI.
@domfarolino seems this was missed when updating tests for post-insertion steps.
domfarolino
approved these changes
Mar 16, 2026
Member
domfarolino
left a comment
There was a problem hiding this comment.
Agreed, thanks for catching this @rniwa, nice find.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To "prepare the script element" [1] exits early when the element is disconnected. In this test, the script element represented by frag_script_2 which logs "inline script #3" is disconnected in the preceeding script (frag_script_1 / "inline script #2"). Since post-connection steps [2] are executed in the tree order, by the time we are to "prepare the script element" on frag_script_2 / "inline script #3", the script element is already disconnected and the script will not be executed.
This test failing in Chrome and Safari but passing in Firefox. After the change, the test passes in Chrome and Safari and fails in Firefox.
[1] https://html.spec.whatwg.org/multipage/scripting.html#prepare-the-script-element
[2] https://dom.spec.whatwg.org/#concept-node-post-connection-ext