diff --git a/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-attachment.html b/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-attachment.html index 6fb2a8a5ecc30..aec9a276f931f 100644 --- a/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-attachment.html +++ b/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-attachment.html @@ -42,9 +42,13 @@ originalShadowRoot = element.shadowRoot; } - // Now, call attachShadow() and make sure we get back the same (original) shadowRoot, but empty. const oppositeMode = (mode === 'open') ? 'closed' : 'open'; - const newShadow = element.attachShadow({mode: oppositeMode}); // Should be no exception here + assert_throws_dom('NotSupportedError', () => { + element.attachShadow({mode: oppositeMode}); + }, 'Calling attachShadow with a declarative shadow fails if the mode doesn\'t match'); + + // Now, call attachShadow() and make sure we get back the same (original) shadowRoot, but empty. + const newShadow = element.attachShadow({mode: mode, delegatesFocus: delegatesFocus}); if (mode === 'open') { assert_equals(element.shadowRoot, originalShadowRoot, 'The same shadow root should be returned'); assert_equals(element.shadowRoot.innerHTML, '', 'Empty shadow content'); diff --git a/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-basic.html b/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-basic.html index 20ca34f6f3e25..8799978804a53 100644 --- a/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-basic.html +++ b/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-basic.html @@ -154,10 +154,14 @@ diff --git a/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-repeats.html b/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-repeats.html new file mode 100644 index 0000000000000..3da9cff360c64 --- /dev/null +++ b/testing/web-platform/tests/shadow-dom/declarative/declarative-shadow-dom-repeats.html @@ -0,0 +1,73 @@ + +Declarative Shadow DOM Element Attachment + + + + + + + + + + +
+ + +
+ +
+ + +
+ + + +
+ +
+ + + +
+ +
+ +