Summary

Harness status: OK

Found 4 tests

Details

ResultTest NameMessage
PasscustomElements.getName must return null when the registry does not contain an entry with the given constructor
Asserts run
Pass
assert_equals(null, null)
    at Test.<anonymous> ( /custom-elements/CustomElementRegistry-getName.html:9:3)
PasscustomElements.getName must throw when the element interface is not a constructor
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function () { customElements.getName(undefined); }", "customElements.getName must throw a TypeError when the element interface is undefined")
    at Test.<anonymous> ( /custom-elements/CustomElementRegistry-getName.html:13:3)
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function () { customElements.getName(null); }", "customElements.getName must throw a TypeError when the element interface is null")
    at Test.<anonymous> ( /custom-elements/CustomElementRegistry-getName.html:15:3)
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function () { customElements.getName('foo-bar'); }", "customElements.getName must throw a TypeError when the element interface is a string")
    at Test.<anonymous> ( /custom-elements/CustomElementRegistry-getName.html:17:3)
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function () { customElements.getName(1); }", "customElements.getName must throw a TypeError when the element interface is a number")
    at Test.<anonymous> ( /custom-elements/CustomElementRegistry-getName.html:19:3)
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function () { customElements.getName({}); }", "customElements.getName must throw a TypeError when the element interface is an object")
    at Test.<anonymous> ( /custom-elements/CustomElementRegistry-getName.html:21:3)
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function () { customElements.getName([]) }", "customElements.getName must throw a TypeError when the element interface is an array")
    at Test.<anonymous> ( /custom-elements/CustomElementRegistry-getName.html:23:3)
PasscustomElements.getName returns the name of the entry with the given constructor when there is a matching entry.
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function () { customElements.getName(customElements.getName(OtherExistingCustomElement)); }", "customElements.getName must throw a TypeError when the element interface is undefined")
    at Test.<anonymous> ( /custom-elements/CustomElementRegistry-getName.html:30:5)
Pass
assert_equals("other-existing-custom-element", "other-existing-custom-element")
    at Test.<anonymous> ( /custom-elements/CustomElementRegistry-getName.html:34:5)
Pass
assert_equals("second-existing-custom-element", "second-existing-custom-element")
    at Test.<anonymous> ( /custom-elements/CustomElementRegistry-getName.html:35:5)
PasscustomElements.getName returns the name of the entry with the given customized built in constructor when there is a matching entry.
Asserts run
Pass
assert_equals("button-custom-built-in-element", "button-custom-built-in-element")
    at Test.<anonymous> ( /custom-elements/CustomElementRegistry-getName.html:43:5)
Pass
assert_equals("input-custom-built-in-element", "input-custom-built-in-element")
    at Test.<anonymous> ( /custom-elements/CustomElementRegistry-getName.html:44:5)