Summary

Harness status: OK

Found 7 tests

Details

ResultTest NameMessage
PassElementInternals.shadowRoot allows access to open shadow root
Asserts run
Pass
assert_equals(null, null)
    at new <anonymous> ( /custom-elements/element-internals-shadowroot.html:17:7)
Pass
assert_equals(DocumentFragment node with 0 children, DocumentFragment node with 0 children)
    at new <anonymous> ( /custom-elements/element-internals-shadowroot.html:19:7)
Pass
assert_true(true)
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:24:3)
PassElementInternals.shadowRoot allows access to closed shadow root
Asserts run
Pass
assert_equals(null, null)
    at new <anonymous> ( /custom-elements/element-internals-shadowroot.html:33:7)
Pass
assert_equals(DocumentFragment node with 0 children, DocumentFragment node with 0 children)
    at new <anonymous> ( /custom-elements/element-internals-shadowroot.html:35:7)
Pass
assert_equals(null, null)
    at new <anonymous> ( /custom-elements/element-internals-shadowroot.html:36:7)
Pass
assert_true(true)
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:41:3)
PassElementInternals cannot be called before constructor, upgrade case
Asserts run
Pass
assert_throws_dom("NotSupportedError", function "() => element.attachInternals()", "attachInternals cannot be called before definition exists")
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:47:3)
Pass
assert_false(false)
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:55:3)
Pass
assert_throws_dom("NotSupportedError", function "() => element.attachInternals()", "attachInternals cannot be called before constructor")
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:56:3)
Pass
assert_true(true)
    at new <anonymous> ( /custom-elements/element-internals-shadowroot.html:51:7)
Pass
assert_true(true)
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:58:3)
Pass
assert_throws_dom("NotSupportedError", function "() => element.attachInternals()", "attachInternals already called")
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:59:3)
PassElementInternals *can* be called after constructor, upgrade case
Asserts run
Pass
assert_throws_dom("NotSupportedError", function "() => element.attachInternals()", "attachInternals cannot be called before constructor")
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:72:3)
Pass
assert_false(false)
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:73:3)
Pass
assert_true(true)
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:75:3)
Pass
assert_true(true, "After the constructor, ok to call from outside")
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:76:3)
PassElementInternals cannot be called after constructor calls it, create case
Asserts run
Pass
assert_true(true)
    at new <anonymous> ( /custom-elements/element-internals-shadowroot.html:84:7)
Pass
assert_true(true)
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:89:3)
Pass
assert_throws_dom("NotSupportedError", function "() => element.attachInternals()", "attachInternals already called")
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:90:3)
PassElementInternals disabled by disabledFeatures
Asserts run
Pass
assert_false(false)
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:104:3)
Pass
assert_throws_dom("NotSupportedError", function "() => element.attachInternals()", "attachInternals forbidden by disabledFeatures, pre-upgrade")
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:105:3)
Pass
assert_throws_dom("NotSupportedError", function "() => this.attachInternals()", "attachInternals forbidden by disabledFeatures, constructor")
    at new <anonymous> ( /custom-elements/element-internals-shadowroot.html:100:7)
Pass
assert_true(true)
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:107:3)
Pass
assert_throws_dom("NotSupportedError", function "() => element.attachInternals()", "attachInternals forbidden by disabledFeatures, post-upgrade")
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:108:3)
PassElementInternals.shadowRoot doesn't reveal pre-attached closed shadowRoot
Asserts run
Pass
assert_true(true)
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:115:3)
Pass
assert_false(false)
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:125:3)
Pass
assert_throws_dom("NotSupportedError", function "() => this.attachShadow({mode:'open'})", "attachShadow already called")
    at new <anonymous> ( /custom-elements/element-internals-shadowroot.html:119:7)
Pass
assert_equals(null, null, "ElementInternals.shadowRoot should not be available for pre-attached shadow")
    at new <anonymous> ( /custom-elements/element-internals-shadowroot.html:121:7)
Pass
assert_true(true, "Failed to construct - test failed")
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:127:3)
Pass
assert_equals(null, null, "shadow root is closed")
    at Test.<anonymous> ( /custom-elements/element-internals-shadowroot.html:128:3)