OLD | NEW |
1 This is a testharness.js-based test. | 1 This is a testharness.js-based test. |
2 PASS "window.customElements.define" should exists | 2 PASS "window.customElements.define" should exists |
3 PASS If no arguments, should throw a TypeError | 3 PASS If no arguments, should throw a TypeError |
4 PASS If one argument, should throw a TypeError | 4 PASS If one argument, should throw a TypeError |
5 PASS If constructor is undefined, should throw a TypeError | 5 PASS If constructor is undefined, should throw a TypeError |
6 PASS If constructor is null, should throw a TypeError | 6 PASS If constructor is null, should throw a TypeError |
7 PASS If constructor is object, should throw a TypeError | 7 PASS If constructor is object, should throw a TypeError |
8 PASS If constructor is string, should throw a TypeError | 8 PASS If constructor is string, should throw a TypeError |
9 PASS If constructor is arrow function, should throw a TypeError | 9 PASS If constructor is arrow function, should throw a TypeError |
10 PASS If constructor is method, should throw a TypeError | 10 PASS If constructor is method, should throw a TypeError |
| 11 FAIL If constructor is HTMLElement, should throw a TypeError assert_throws: func
tion "() => { |
| 12 customElements.define(`test-define-constructor-${t[0]}`, t[1]); |
| 13 }" threw object "SyntaxError: Failed to execute 'define' on 'CustomElement
sRegistry': "test-define-constructor-HTMLElement" is not a valid custom element
name" ("SyntaxError") expected object "TypeError" ("TypeError") |
| 14 FAIL If constructor is HTMLButtonElement, should throw a TypeError assert_throws
: function "() => { |
| 15 customElements.define(`test-define-constructor-${t[0]}`, t[1]); |
| 16 }" threw object "SyntaxError: Failed to execute 'define' on 'CustomElement
sRegistry': "test-define-constructor-HTMLButtonElement" is not a valid custom el
ement name" ("SyntaxError") expected object "TypeError" ("TypeError") |
| 17 FAIL If constructor is HTMLImageElement, should throw a TypeError assert_throws:
function "() => { |
| 18 customElements.define(`test-define-constructor-${t[0]}`, t[1]); |
| 19 }" threw object "SyntaxError: Failed to execute 'define' on 'CustomElement
sRegistry': "test-define-constructor-HTMLImageElement" is not a valid custom ele
ment name" ("SyntaxError") expected object "TypeError" ("TypeError") |
| 20 FAIL If constructor is HTMLMediaElement, should throw a TypeError assert_throws:
function "() => { |
| 21 customElements.define(`test-define-constructor-${t[0]}`, t[1]); |
| 22 }" threw object "SyntaxError: Failed to execute 'define' on 'CustomElement
sRegistry': "test-define-constructor-HTMLMediaElement" is not a valid custom ele
ment name" ("SyntaxError") expected object "TypeError" ("TypeError") |
| 23 FAIL If constructor is Image, should throw a TypeError assert_throws: function "
() => { |
| 24 customElements.define(`test-define-constructor-${t[0]}`, t[1]); |
| 25 }" threw object "SyntaxError: Failed to execute 'define' on 'CustomElement
sRegistry': "test-define-constructor-Image" is not a valid custom element name"
("SyntaxError") expected object "TypeError" ("TypeError") |
| 26 FAIL If constructor is Audio, should throw a TypeError assert_throws: function "
() => { |
| 27 customElements.define(`test-define-constructor-${t[0]}`, t[1]); |
| 28 }" threw object "SyntaxError: Failed to execute 'define' on 'CustomElement
sRegistry': "test-define-constructor-Audio" is not a valid custom element name"
("SyntaxError") expected object "TypeError" ("TypeError") |
| 29 FAIL If constructor is Option, should throw a TypeError assert_throws: function
"() => { |
| 30 customElements.define(`test-define-constructor-${t[0]}`, t[1]); |
| 31 }" threw object "SyntaxError: Failed to execute 'define' on 'CustomElement
sRegistry': "test-define-constructor-Option" is not a valid custom element name"
("SyntaxError") expected object "TypeError" ("TypeError") |
11 PASS Element names: defining an element named a- should succeed | 32 PASS Element names: defining an element named a- should succeed |
12 PASS Element names: defining an element named a-a should succeed | 33 PASS Element names: defining an element named a-a should succeed |
13 PASS Element names: defining an element named aa- should succeed | 34 PASS Element names: defining an element named aa- should succeed |
14 PASS Element names: defining an element named aa-a should succeed | 35 PASS Element names: defining an element named aa-a should succeed |
15 PASS Element names: defining an element named a-.-_ should succeed | 36 PASS Element names: defining an element named a-.-_ should succeed |
16 PASS Element names: defining an element named a-0123456789 should succeed | 37 PASS Element names: defining an element named a-0123456789 should succeed |
17 PASS Element names: defining an element named a-漢字 should succeed | 38 PASS Element names: defining an element named a-漢字 should succeed |
18 PASS Element names: defining an element named a-𠀋 should succeed | 39 PASS Element names: defining an element named a-𠀋 should succeed |
19 PASS Element names: defining an element named undefined should throw a SyntaxErr
or | 40 PASS Element names: defining an element named undefined should throw a SyntaxErr
or |
20 PASS Element names: defining an element named null should throw a SyntaxError | 41 PASS Element names: defining an element named null should throw a SyntaxError |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 }" did not throw | 87 }" did not throw |
67 FAIL If extends is nextid, should throw a NotSupportedError assert_throws: funct
ion "() => { | 88 FAIL If extends is nextid, should throw a NotSupportedError assert_throws: funct
ion "() => { |
68 customElements.define('test-define-extend-' + name, class {}, { extends:
name }); | 89 customElements.define('test-define-extend-' + name, class {}, { extends:
name }); |
69 }" did not throw | 90 }" did not throw |
70 FAIL If extends is spacer, should throw a NotSupportedError assert_throws: funct
ion "() => { | 91 FAIL If extends is spacer, should throw a NotSupportedError assert_throws: funct
ion "() => { |
71 customElements.define('test-define-extend-' + name, class {}, { extends:
name }); | 92 customElements.define('test-define-extend-' + name, class {}, { extends:
name }); |
72 }" did not throw | 93 }" did not throw |
73 FAIL If extends is elementnametobeunknownelement, should throw a NotSupportedErr
or assert_throws: function "() => { | 94 FAIL If extends is elementnametobeunknownelement, should throw a NotSupportedErr
or assert_throws: function "() => { |
74 customElements.define('test-define-extend-' + name, class {}, { extends:
name }); | 95 customElements.define('test-define-extend-' + name, class {}, { extends:
name }); |
75 }" did not throw | 96 }" did not throw |
76 PASS If constructor.observedAttributes throws, should rethrow | |
77 PASS If constructor.prototype throws, should rethrow | 97 PASS If constructor.prototype throws, should rethrow |
78 PASS If Type(constructor.prototype) is undefined, should throw a TypeError | 98 PASS If Type(constructor.prototype) is undefined, should throw a TypeError |
79 PASS If Type(constructor.prototype) is string, should throw a TypeError | 99 PASS If Type(constructor.prototype) is string, should throw a TypeError |
80 PASS If constructor.prototype.connectedCallback throws, should rethrow | 100 PASS If constructor.prototype.connectedCallback throws, should rethrow |
81 PASS If constructor.prototype.connectedCallback is undefined, should succeed | 101 PASS If constructor.prototype.connectedCallback is undefined, should succeed |
82 PASS If constructor.prototype.connectedCallback is function, should succeed | 102 PASS If constructor.prototype.connectedCallback is function, should succeed |
83 PASS If constructor.prototype.connectedCallback is null, should throw a TypeErro
r | 103 PASS If constructor.prototype.connectedCallback is null, should throw a TypeErro
r |
84 PASS If constructor.prototype.connectedCallback is object, should throw a TypeEr
ror | 104 PASS If constructor.prototype.connectedCallback is object, should throw a TypeEr
ror |
85 PASS If constructor.prototype.connectedCallback is integer, should throw a TypeE
rror | 105 PASS If constructor.prototype.connectedCallback is integer, should throw a TypeE
rror |
86 PASS If constructor.prototype.disconnectedCallback throws, should rethrow | 106 PASS If constructor.prototype.disconnectedCallback throws, should rethrow |
87 PASS If constructor.prototype.disconnectedCallback is undefined, should succeed | 107 PASS If constructor.prototype.disconnectedCallback is undefined, should succeed |
88 PASS If constructor.prototype.disconnectedCallback is function, should succeed | 108 PASS If constructor.prototype.disconnectedCallback is function, should succeed |
89 PASS If constructor.prototype.disconnectedCallback is null, should throw a TypeE
rror | 109 PASS If constructor.prototype.disconnectedCallback is null, should throw a TypeE
rror |
90 PASS If constructor.prototype.disconnectedCallback is object, should throw a Typ
eError | 110 PASS If constructor.prototype.disconnectedCallback is object, should throw a Typ
eError |
91 PASS If constructor.prototype.disconnectedCallback is integer, should throw a Ty
peError | 111 PASS If constructor.prototype.disconnectedCallback is integer, should throw a Ty
peError |
92 PASS If constructor.prototype.attributeChangedCallback throws, should rethrow | 112 PASS If constructor.prototype.attributeChangedCallback throws, should rethrow |
93 PASS If constructor.prototype.attributeChangedCallback is undefined, should succ
eed | 113 PASS If constructor.prototype.attributeChangedCallback is undefined, should succ
eed |
94 PASS If constructor.prototype.attributeChangedCallback is function, should succe
ed | 114 PASS If constructor.prototype.attributeChangedCallback is function, should succe
ed |
95 PASS If constructor.prototype.attributeChangedCallback is null, should throw a T
ypeError | 115 PASS If constructor.prototype.attributeChangedCallback is null, should throw a T
ypeError |
96 PASS If constructor.prototype.attributeChangedCallback is object, should throw a
TypeError | 116 PASS If constructor.prototype.attributeChangedCallback is object, should throw a
TypeError |
97 PASS If constructor.prototype.attributeChangedCallback is integer, should throw
a TypeError | 117 PASS If constructor.prototype.attributeChangedCallback is integer, should throw
a TypeError |
98 Harness: the test ran to completion. | 118 Harness: the test ran to completion. |
99 | 119 |
OLD | NEW |