Automatic update from web-platform-tests custom-elements: merge revamped-scoped-registry and custom-element-registry into registries And rename away from .tentative for the Revamped Scoped Custom Element Registry tests as https://github.com/whatwg/html/pull/10869 and https://github.com/whatwg/dom/pull/1341 are about to land. -- wpt-commits: 7087b359a1e2e306db934e5ff11218bd871cb228 wpt-pr: 51953
31 lines
1.1 KiB
HTML
31 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org">
|
|
<link rel="help" href="https://github.com/whatwg/html/issues/10854">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
test(() => {
|
|
let registry = new CustomElementRegistry();
|
|
assert_not_equals(registry, window.customElements);
|
|
}, 'Create a CustomElementRegistry not identically equal to window.customElements');
|
|
|
|
test(() => {
|
|
let registry = new CustomElementRegistry();
|
|
window.customElements.define('a-b', class extends HTMLElement {});
|
|
assert_equals(registry.get('a-b'), undefined);
|
|
}, 'Defining an element in the global registry does not add a definition to a scoped CustomElementRegistry');
|
|
|
|
test(() => {
|
|
let registry = new CustomElementRegistry();
|
|
registry.define('b-c', class extends HTMLElement {});
|
|
assert_equals(window.customElements.get('b-c'), undefined);
|
|
}, 'Defining an element in a scoped global registry does not add a definition to the global registry');
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|