1 Testing document.registerElement() basic behaviors.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 PASS typeof fooConstructor is "function"
7 PASS fooConstructor.prototype.__proto__ is HTMLElement.prototype
8 PASS fooConstructor.prototype.thisIsPrototype is true
9 PASS document.registerElement("x-bad-a", HTMLElement) threw exception NotSupportedError: Failed to execute 'registerElement' on 'Document': Registration failed for type 'x-bad-a'. The prototype is already in-use as an interface prototype object..
10 PASS document.registerElement("x-bad-b", fooConstructor) threw exception NotSupportedError: Failed to execute 'registerElement' on 'Document': Registration failed for type 'x-bad-b'. The prototype is already in-use as an interface prototype object..
11 PASS document.registerElement("x-bad-c", { prototype: proto }) threw exception NotSupportedError: Failed to execute 'registerElement' on 'Document': Registration failed for type 'x-bad-c'. Prototype constructor property is not configurable..
12 PASS fooConstructor() threw exception TypeError: DOM object constructor cannot be called as a function..
13 PASS createdFoo.__proto__ is fooConstructor.prototype
14 PASS createdFoo.constructor is fooConstructor
15 PASS createdFoo.tagName is "X-FOO"
16 PASS createdFoo.textContent is "Hello"
17 PASS createdFoo.lastChild is childDiv
18 PASS parsedFoo.__proto__ is fooConstructor.prototype
19 PASS parsedFoo.tagName is "X-FOO"
20 PASS parsedFoo.someProperty is container.firstChild.someProperty
21 PASS barConstructor !== fooConstructor is true
22 PASS createdBar.tagName is "X-BAR"
23 PASS createdBaz.tagName is "X-BAZ"
24 PASS createdBaz.thisIsPrototype is true
25 PASS createdBaz.thisIsAlsoPrototype is true
26 PASS createdUpperBar.constructor is barConstructor
27 PASS createdUpperBar.tagName is "X-BAR"
28 PASS createdMixedBar.constructor is barConstructor
29 PASS createdMixedBar.tagName is "X-BAR"
30 PASS container.firstChild.constructor is barConstructor
31 PASS container.firstChild.tagName is "X-BAR"
32 PASS container.lastChild.constructor is barConstructor
33 PASS container.lastChild.tagName is "X-BAR"
34 PASS (new fooConstructor).tagName is "X-FOO"
35 PASS (new barConstructor).tagName is "X-BAR"
36 PASS (new bazConstructor).tagName is "X-BAZ"
37 PASS successfullyParsed is true