Summary

Harness status: OK

Found 12 tests

Details

ResultTest NameMessage
PassHTMLElement constructor must throw a TypeError when NewTarget is equal to itself
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function () { new HTMLElement(); }")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:17:5)
PassHTMLElement constructor must throw a TypeError when NewTarget is equal to itself via a Proxy object
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function () { new HTMLElement(); }")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:22:5)
PassHTMLElement constructor must throw TypeError when it has not been defined by customElements.define
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function () { new SomeCustomElement; }")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:27:5)
PassCustom element constructor must throw TypeError when it does not extend HTMLElement
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function () { new SomeCustomElement(); }")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:33:5)
PassCustom element constructor must throw TypeError when it does not extend the proper element interface
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function () { new SomeCustomButtonElement(); }")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:39:5)
PassHTMLElement constructor must infer the tag name from the element interface
Asserts run
Pass
assert_true(true, "A custom element must inherit from Element")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:47:5)
Pass
assert_true(true, "A custom element must inherit from Node")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:48:5)
Pass
assert_equals("inferred-name", "inferred-name")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:49:5)
Pass
assert_equals("INFERRED-NAME", "INFERRED-NAME")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:50:5)
Pass
assert_equals("http://www.w3.org/1999/xhtml", "http://www.w3.org/1999/xhtml", "A custom HTML element must use HTML namespace")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:51:5)
Pass
assert_equals(Element node <inferred-name></inferred-name>, Element node <inferred-name></inferred-name>, "document.body.appendChild must be able to insert a custom element")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:54:5)
Pass
assert_equals(Element node <inferred-name></inferred-name>, Element node <inferred-name></inferred-name>, "document.querySelector must be able to find a custom element by its tag name")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:56:5)
PassHTMLElement constructor must allow subclassing a custom element
Asserts run
Pass
assert_true(true)
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:68:5)
Pass
assert_false(false)
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:69:5)
Pass
assert_equals("concrete-custom-element", "concrete-custom-element")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:70:5)
Pass
assert_equals("CONCRETE-CUSTOM-ELEMENT", "CONCRETE-CUSTOM-ELEMENT")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:71:5)
Pass
assert_true(true)
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:74:5)
Pass
assert_true(true)
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:75:5)
Pass
assert_equals("sub-custom-element", "sub-custom-element")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:76:5)
Pass
assert_equals("SUB-CUSTOM-ELEMENT", "SUB-CUSTOM-ELEMENT")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:77:5)
PassHTMLElement constructor must allow subclassing an user-defined subclass of HTMLElement
Asserts run
Pass
assert_true(true)
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:87:5)
Pass
assert_true(true)
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:88:5)
Pass
assert_equals("concrete-sub-custom-element", "concrete-sub-custom-element")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:89:5)
Pass
assert_equals("CONCRETE-SUB-CUSTOM-ELEMENT", "CONCRETE-SUB-CUSTOM-ELEMENT")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:90:5)
FailHTMLElement constructor must only get .prototype once, calling proxy constructor directlyassert_equals: Should have gotten .prototype once expected 1 but got 2
    at Test.<anonymous> (https://www1.wpt.live/custom-elements/HTMLElement-constructor.html:110:5)
    at Test.step (https://www1.wpt.live/resources/testharness.js:2638:25)
    at test (https://www1.wpt.live/resources/testharness.js:633:30)
    at https://www1.wpt.live/custom-elements/HTMLElement-constructor.html:94:1
Asserts run
Fail
assert_equals(2, 1, "Should have gotten .prototype once")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:110:5)
FailHTMLElement constructor must only get .prototype once, calling proxy constructor via Reflectassert_equals: Should have gotten .prototype once expected 1 but got 2
    at Test.<anonymous> (https://www1.wpt.live/custom-elements/HTMLElement-constructor.html:134:5)
    at Test.step (https://www1.wpt.live/resources/testharness.js:2638:25)
    at test (https://www1.wpt.live/resources/testharness.js:633:30)
    at https://www1.wpt.live/custom-elements/HTMLElement-constructor.html:118:1
Asserts run
Fail
assert_equals(2, 1, "Should have gotten .prototype once")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:134:5)
FailHTMLElement constructor must only get .prototype once, calling proxy constructor via Reflect with no inheritanceassert_equals: Should have gotten .prototype once expected 1 but got 2
    at Test.<anonymous> (https://www1.wpt.live/custom-elements/HTMLElement-constructor.html:158:5)
    at Test.step (https://www1.wpt.live/resources/testharness.js:2638:25)
    at test (https://www1.wpt.live/resources/testharness.js:633:30)
    at https://www1.wpt.live/custom-elements/HTMLElement-constructor.html:142:1
Asserts run
Fail
assert_equals(2, 1, "Should have gotten .prototype once")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:158:5)
FailHTMLElement constructor must not get .prototype until it finishes its registration sanity checks, calling via Reflectassert_equals: Should never have gotten .prototype expected 0 but got 1
    at Test.<anonymous> (https://www1.wpt.live/custom-elements/HTMLElement-constructor.html:181:5)
    at Test.step (https://www1.wpt.live/resources/testharness.js:2638:25)
    at test (https://www1.wpt.live/resources/testharness.js:633:30)
    at https://www1.wpt.live/custom-elements/HTMLElement-constructor.html:165:1
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function () { Reflect.construct(HTMLElement, [], countingProxy) }", "Should not be able to construct an HTMLElement named 'button'")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:178:5)
Fail
assert_equals(1, 0, "Should never have gotten .prototype")
    at Test.<anonymous> ( /custom-elements/HTMLElement-constructor.html:181:5)