-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add new tests for customelementregistry content attribute and specifying null to createEleent and attachShadow per #56108
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
Conversation
| </head> | ||
| <body> | ||
| <div id="host-window"><template shadowrootmode="open"><a-b></a-b></template></div> | ||
| <div id="host-null"><template shadowrootmode="open" shadowrootcustomelementregistry=""><a-b></a-b></template></div> |
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 was never used in the test.
72bf811 to
accfde2
Compare
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.
@ja-y-son might also want to review these.
| <script src="../../resources/testharness.js"></script> | ||
| <script src="../../resources/testharnessreport.js"></script> |
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.
| <script src="../../resources/testharness.js"></script> | |
| <script src="../../resources/testharnessreport.js"></script> | |
| <script src="/resources/testharness.js"></script> | |
| <script src="/resources/testharnessreport.js"></script> |
| <script src="../../resources/testharness.js"></script> | ||
| <script src="../../resources/testharnessreport.js"></script> |
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.
| <script src="../../resources/testharness.js"></script> | |
| <script src="../../resources/testharnessreport.js"></script> | |
| <script src="/resources/testharness.js"></script> | |
| <script src="/resources/testharnessreport.js"></script> |
| <script src="../../resources/testharness.js"></script> | ||
| <script src="../../resources/testharnessreport.js"></script> |
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.
| <script src="../../resources/testharness.js"></script> | |
| <script src="../../resources/testharnessreport.js"></script> | |
| <script src="/resources/testharness.js"></script> | |
| <script src="/resources/testharnessreport.js"></script> |
…ing null to createEleent and attachShadow per - whatwg/dom#1424 - whatwg/dom#1423 Also update the existing tests to account for the behavior differences.`
accfde2 to
237753b
Compare
| assert_equals(doc.createElement(elementName, {customElementRegistry: null}).customElementRegistry, null); | ||
| assert_equals(doc.createElementNS('http://www.w3.org/1999/xhtml', 'div', {customElementRegistry: null}).customElementRegistry, null); | ||
| }, `document.createElement should create a ${elementDescription} with null registry if customElement is set to null`); | ||
|
|
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'd imagine the test for null registry option on createElement to be placed in Document-createElement.html
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.
Let me address these comments in a follow up since the corresponding WebKit change has already landed.
| test((test) => { | ||
| const [doc, win] = makeIframe(test); | ||
| const host = doc.createElement(elementName); | ||
| const shadowRoot = host.attachShadow({mode: 'closed', customElementRegistry: null}) |
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.
ditto, would imagine this to be placed in ShadowRoot-init-customElementRegistry.html
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.
Do we want to create test cases for cross document append where append does upgrade due to element getting registry on adopt?
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.
A good idea. Will do.
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.
Do we want to add tests to ensure the subtree of the element with customelementregistry attribute also has null registry in both HTML and XHTML?
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.
A good idea. Will do.
Tests: - web-platform-tests/wpt#56108 - web-platform-tests/wpt#56176 Helps with #1413. Co-authored-by: Anne van Kesteren <[email protected]>
Also update the existing tests to account for the behavior differences.`