Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add insertion tests for the new changes with the "deferred steps queue" #15264

Closed
wants to merge 16 commits into from

Conversation

nox
Copy link
Contributor

@nox nox commented Feb 6, 2019

Those tests expose differences between Safari and the spec on one side, and the rest of the world on the other side.

[These are for whatwg/dom#732 and whatwg/html#4354. - Anne]

@nox
Copy link
Contributor Author

nox commented Feb 6, 2019

The most interesting one is the button one because it doesn't even rely on a document fragment.

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for writing these! I have some questions and I'm also not sure we should merge these given we're unclear on the direction of the specification still. I'd be somewhat okay if we put .tentative. in the name, but it's not even clear these are the results we want...

@nox nox force-pushed the weird-insert-stuff branch 4 times, most recently from e84e128 to 7cab7bb Compare February 11, 2019 10:46
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to see a test where multiple scripts are inserted at once through a fragment and one of the scripts that executes earlier modifies another script. It'd be good to know that the modification takes effect, as per the current proposed text.

And a similar test where the subsequent script is removed from the tree to see it gets properly aborted.

@nox nox changed the title Add three insertion-related tests Add insertion tests for the new changes with the "deferred steps queue" Feb 11, 2019
@nox nox force-pushed the weird-insert-stuff branch 2 times, most recently from 9c8d1ab to 54d4ba6 Compare February 19, 2019 14:34
annevk added a commit that referenced this pull request Dec 6, 2019
@annevk
Copy link
Member

annevk commented Dec 9, 2019

FYI: I'm in the process of rewriting these tests so they work with newish wpt requirements.

annevk added a commit that referenced this pull request Jan 6, 2020
nox added 6 commits April 2, 2020 16:47
The test follows the spec, but the spec is followed only by Safari.
This test too follows the spec, but only Safari defines the custom element
before inserting one in the document, other browsers upgrade the custom-element
at the time of the customElements.define call because it is already in tree.
This test once again follows the spec, but only Safari executes it correctly,
with no form owner set on the button at the time of the execution of the
script.
Safari and Chrome pass that test, Firefox fails it.
@annevk
Copy link
Member

annevk commented Apr 3, 2020

These tests are cleaned up now, but pass conditions probably still need adjusting.

@annevk
Copy link
Member

annevk commented Feb 1, 2024

@domfarolino you might want to repurpose these for #44308 and whatwg/dom#808. There's a couple other interesting cases these tests touch.

@domfarolino
Copy link
Member

Closing this out in favor of #44658 which is being reviewed now. We'd like to land it soon, with Git co-author credit to @nox for working on this suite of tests initially.

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants