-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add test cases for null registry element upon adoption #56423
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
base: master
Are you sure you want to change the base?
Conversation
|
@annevk PTAL, thanks! |
annevk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should have some tests where you just call adoptNode(). And some tests with attachShadow() instead of declarative shadow roots.
And some tests where we initialize() various parent nodes in this null/global shadow tree with a scoped registry prior to adoption.
|
Added more test cases to hopefully cover most of the adoption cases that we're interested in this spec change. I haven't implemented this part of spec change in chromium so I tried my best to verify that each test case is asserting the correct expectation, but will appreciate a lot for another review of them. |
annevk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This generally looks good. I'd like to try this in WebKit, but the patch needs rebasing it seems.
cc @rniwa
|
|
||
| function runTest(operation, operationName) { | ||
| // Null registry child tests | ||
| test((test) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional nit (applies quite a few times):
| test((test) => { | |
| test(test => { | |
|
@annevk Updated the nit. Let me know if you've tried on Safari and if you think we should make any other changes on the PR |
Add test cases that covers the scenarios in whatwg/dom#1437