Add new tests for customelementregistry content attribute and specifying null to createEleent and attachShadow per#56108
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.
This was never used in the test.
72bf811 to
accfde2
Compare
| <script src="../../resources/testharness.js"></script> | ||
| <script src="../../resources/testharnessreport.js"></script> |
There was a problem hiding this comment.
| <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.
| <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.
| <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.
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.
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.
ditto, would imagine this to be placed in ShadowRoot-init-customElementRegistry.html
There was a problem hiding this comment.
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.
A good idea. Will do.
There was a problem hiding this comment.
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.
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 <annevk@annevk.nl>
This makes it possible to have elements with a null custom element registry in a document tree, allowing the registry to be loaded at a later point. (This commit also fixes a couple minor editorial issues.) Tests: web-platform-tests/wpt#56108. Helps with #1413. Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
Also update the existing tests to account for the behavior differences.`