| Testing document.register() type extension behaviours through createElement(). |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| PASS document.register('x-foo', { prototype: Object.create(HTMLDivElement.prototype) }) threw exception Error: InvalidStateError: DOM Exception 11. |
| PASS fooNewed.outerHTML is '<x-foo></x-foo>' |
| PASS fooNewed instanceof fooConstructor && fooNewed instanceof HTMLElement is true |
| PASS fooNewed instanceof HTMLUnknownElement is false |
| PASS barNewed.outerHTML is '<input is="x-bar">' |
| PASS barNewed instanceof barConstructor && barNewed instanceof HTMLInputElement is true |
| PASS isFormControl(barNewed) is true |
| PASS bazNewed.outerHTML is '<x-baz></x-baz>' |
| PASS bazNewed instanceof bazConstructor && bazNewed instanceof HTMLElement is true |
| PASS bazNewed instanceof HTMLUnknownElement is false |
| PASS quxNewed instanceof quxConstructor && quxNewed instanceof barConstructor && quxNewed instanceof HTMLInputElement is true |
| PASS quxNewed.outerHTML is '<input is="x-qux">' |
| PASS isFormControl(quxNewed) is true |
| PASS fooCreated.outerHTML is '<x-foo></x-foo>' |
| PASS fooCreated instanceof fooConstructor is true |
| PASS barCreated.outerHTML is '<x-bar></x-bar>' |
| PASS barCreated instanceof barConstructor is false |
| PASS barCreated instanceof HTMLUnknownElement is true |
| PASS bazCreated.outerHTML is '<x-baz></x-baz>' |
| PASS bazCreated instanceof bazConstructor is true |
| PASS bazCreated instanceof HTMLUnknownElement is false |
| PASS quxCreated.outerHTML is '<x-qux></x-qux>' |
| PASS quxCreated instanceof quxConstructor is false |
| PASS quxCreated instanceof HTMLUnknownElement is true |
| PASS divFooCreated.outerHTML is '<div is="x-foo"></div>' |
| PASS divFooCreated instanceof fooConstructor is false |
| PASS divFooCreated instanceof HTMLDivElement is true |
| PASS inputBarCreated.outerHTML is '<input is="x-bar">' |
| PASS inputBarCreated instanceof barConstructor is true |
| PASS inputBarCreated instanceof HTMLUnknownElement is false |
| PASS isFormControl(inputBarCreated) is true |
| PASS divBarCreated.outerHTML is '<div is="x-bar"></div>' |
| PASS divBarCreated instanceof barConstructor is false |
| PASS divBarCreated instanceof HTMLDivElement is true |
| PASS fooBarCreated.outerHTML is '<x-foo is="x-bar"></x-foo>' |
| PASS fooBarCreated instanceof fooConstructor is true |
| PASS barFooCreated.outerHTML is '<x-bar is="x-foo"></x-bar>' |
| PASS barFooCreated instanceof HTMLUnknownElement is true |
| PASS fooCreatedNull.outerHTML is '<x-foo></x-foo>' |
| PASS fooCreatedNull instanceof fooConstructor is true |
| PASS fooCreatedEmpty.outerHTML is '<x-foo></x-foo>' |
| PASS fooCreatedEmpty instanceof fooConstructor is true |
| PASS document.createElement('@invalid', 'x-bar') threw exception Error: InvalidCharacterError: DOM Exception 5. |
| PASS fooCreatedNS.outerHTML is '<x-foo></x-foo>' |
| PASS fooCreatedNS instanceof fooConstructor is true |
| PASS barCreatedNS.outerHTML is '<input is="x-bar">' |
| PASS barCreatedNS instanceof barConstructor is true |
| PASS isFormControl(barCreatedNS) is true |
| PASS document.createElementNS('http://example.com/2013/no-such-namespace', 'xml:lang', 'x-bar') threw exception Error: NamespaceError: DOM Exception 14. |
| PASS fooParsed instanceof fooConstructor is true |
| PASS barParsed instanceof barConstructor is true |
| PASS isFormControl(barParsed) is true |
| PASS divFooParsed instanceof fooConstructor is false |
| PASS divFooParsed instanceof HTMLDivElement is true |
| PASS namedBarParsed instanceof barConstructor is false |
| PASS namedBarParsed instanceof HTMLUnknownElement is true |
| PASS divBarParsed instanceof barConstructor is false |
| PASS divBarParsed instanceof HTMLDivElement is true |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |