Update web-platform-tests to revision a412aa768f8558ec93bcab7e7f1aabcce6f38e88

This commit is contained in:
WPT Sync Bot 2019-06-11 10:23:16 +00:00
parent b3eed5b5bd
commit 653b871d4f
64 changed files with 2136 additions and 64 deletions

View file

@ -14,6 +14,7 @@
<body>
<div id="log"></div>
<script>
setup({allow_uncaught_exception:true});
class PredefinedCustomElement extends HTMLElement {}
customElements.define('predefined-custom-element', PredefinedCustomElement);
@ -185,6 +186,23 @@ document_types().filter(function (entry) { return !entry.isOwner && entry.hasBro
});
test(() => {
class ShadowDisabledElement extends HTMLElement {
static get disabledFeatures() { return ['shadow']; }
}
let error = null;
window.addEventListener('error', e => { error = e.error; }, {once: true});
let element = document.createElement('shadow-disabled');
element.attachShadow({mode: 'open'});
customElements.define('shadow-disabled', ShadowDisabledElement);
customElements.upgrade(element);
assert_false(element instanceof ShadowDisabledElement,
'Upgrading should fail.');
assert_true(error instanceof DOMException);
assert_equals(error.name, 'NotSupportedError');
}, 'If definition\'s disable shadow is true and element\'s shadow root is ' +
'non-null, then throw a "NotSupportedError" DOMException.');
</script>
</body>
</html>