|
107 | 107 |
|
108 | 108 | function runTest(operation, operationName) { |
109 | 109 | // Null registry child tests |
110 | | - test((test) => { |
| 110 | + test(test => { |
111 | 111 | const [win, host] = operation(addNullRegistryChild(createParentElementWithRegistryAttribute(null)), test); |
112 | 112 | assert_equals(host.querySelector('a-b').customElementRegistry, null); |
113 | 113 | assert_equals(host.firstElementChild.customElementRegistry, null); |
114 | 114 | }, 'Null registry element with element parent with custom element registry attribute (null registry) ' + operationName); |
115 | 115 |
|
116 | | - test ((test) => { |
| 116 | + test (test => { |
117 | 117 | const [win, host] = operation(addNullRegistryChild(createParentElementWithRegistryAttribute(customElements)), test); |
118 | 118 | assert_equals(host.querySelector('a-b').customElementRegistry, win.customElements); |
119 | 119 | assert_equals(host.firstElementChild.customElementRegistry, win.customElements); |
120 | 120 | }, 'Null registry element with element parent with custom element registry attribute (global registry) ' + operationName); |
121 | 121 |
|
122 | | - test ((test) => { |
| 122 | + test (test => { |
123 | 123 | const [win, host] = operation(addNullRegistryChild(createParentElementWithRegistryAttribute(scopedRegistry)), test); |
124 | 124 | assert_equals(host.querySelector('a-b').customElementRegistry, scopedRegistry); |
125 | 125 | assert_equals(host.firstElementChild.customElementRegistry, scopedRegistry); |
126 | 126 | }, 'Null registry element with element parent with custom element registry attribute (scoped registry) ' + operationName); |
127 | 127 |
|
128 | | - test ((test) => { |
| 128 | + test (test => { |
129 | 129 | const [doc, win, host] = operation(addNullRegistryChild(createParentElementWithoutRegistryAttribute(null)), test); |
130 | 130 | assert_equals(host.querySelector('a-b').customElementRegistry, win.customElements); |
131 | 131 | assert_equals(host.firstElementChild.customElementRegistry, win.customElements); |
132 | 132 | }, 'Null registry element with element parent without custom element registry attribute (null registry) ' + operationName); |
133 | 133 |
|
134 | | - test((test) => { |
| 134 | + test(test => { |
135 | 135 | const [win, host] = operation(addNullRegistryChild(createParentElementWithoutRegistryAttribute(customElements)), test); |
136 | 136 | assert_equals(host.querySelector('a-b').customElementRegistry, win.customElements); |
137 | 137 | assert_equals(host.firstElementChild.customElementRegistry, win.customElements); |
138 | 138 | }, 'Null registry element with element parent without custom element registry attribute (global registry) ' + operationName); |
139 | 139 |
|
140 | | - test((test) => { |
| 140 | + test(test => { |
141 | 141 | const [win, host] = operation(addNullRegistryChild(createParentElementWithoutRegistryAttribute(scopedRegistry)), test); |
142 | 142 | assert_equals(host.querySelector('a-b').customElementRegistry, scopedRegistry); |
143 | 143 | assert_equals(host.firstElementChild.customElementRegistry, scopedRegistry); |
144 | 144 | }, 'Null registry element with element parent without custom element registry attribute (scoped registry) ' + operationName); |
145 | 145 |
|
146 | | - test((test) => { |
| 146 | + test(test => { |
147 | 147 | const [win, host] = operation(addNullRegistryChild(createParentDeclarativeShadowRootWithoutRegistryAttribute()), test); |
148 | 148 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, win.customElements); |
149 | 149 | assert_equals(host.shadowRoot.customElementRegistry, win.customElements); |
150 | 150 | }, 'Null registry element with declarative shadow root parent without custom element registry attribute ' + operationName); |
151 | 151 |
|
152 | | - test((test) => { |
| 152 | + test(test => { |
153 | 153 | const [win, host] = operation(addNullRegistryChild(createParentDeclarativeShadowRootWithRegistryAttribute(null)), test); |
154 | 154 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, null); |
155 | 155 | assert_equals(host.shadowRoot.customElementRegistry, null); |
156 | 156 | }, 'Null registry element with declarative shadow root parent with custom element registry attribute (null registry) ' + operationName); |
157 | 157 |
|
158 | | - test((test) => { |
| 158 | + test(test => { |
159 | 159 | const [win, host] = operation(addNullRegistryChild(createParentDeclarativeShadowRootWithRegistryAttribute(customElements)), test); |
160 | 160 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, win.customElements); |
161 | 161 | assert_equals(host.shadowRoot.customElementRegistry, win.customElements); |
162 | 162 | }, 'Null registry element with declarative shadow root parent with custom element registry attribute (global registry) ' + operationName); |
163 | 163 |
|
164 | | - test((test) => { |
| 164 | + test(test => { |
165 | 165 | const [win, host] = operation(addNullRegistryChild(createParentDeclarativeShadowRootWithRegistryAttribute(scopedRegistry)), test); |
166 | 166 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, scopedRegistry); |
167 | 167 | assert_equals(host.shadowRoot.customElementRegistry, scopedRegistry); |
168 | 168 | }, 'Null registry element with declarative shadow root parent with custom element registry attribute (scoped registry) ' + operationName); |
169 | 169 |
|
170 | | - test((test) => { |
| 170 | + test(test => { |
171 | 171 | const [win, host] = operation(addNullRegistryChild(createParentImperativeShadowRoot(null)), test); |
172 | 172 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, win.customElements); |
173 | 173 | assert_equals(host.shadowRoot.customElementRegistry, win.customElements); |
174 | 174 | }, 'Null registry element with imperative shadow root parent (null registry) ' + operationName); |
175 | 175 |
|
176 | | - test((test) => { |
| 176 | + test(test => { |
177 | 177 | const [win, host] = operation(addNullRegistryChild(createParentImperativeShadowRoot(customElements)), test); |
178 | 178 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, win.customElements); |
179 | 179 | assert_equals(host.shadowRoot.customElementRegistry, win.customElements); |
180 | 180 | }, 'Null registry element with imperative shadow root parent (global registry) ' + operationName); |
181 | 181 |
|
182 | | - test((test) => { |
| 182 | + test(test => { |
183 | 183 | const [win, host] = operation(addNullRegistryChild(createParentImperativeShadowRoot(scopedRegistry)), test); |
184 | 184 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, scopedRegistry); |
185 | 185 | assert_equals(host.shadowRoot.customElementRegistry, scopedRegistry); |
186 | 186 | }, 'Null registry element with imperative shadow root parent (scoped registry) ' + operationName); |
187 | 187 |
|
188 | 188 | // Global registry child tests |
189 | | - test ((test) => { |
| 189 | + test (test => { |
190 | 190 | const [win, host] = operation(addGlobalRegistryChild(createParentElementWithRegistryAttribute(null)), test); |
191 | 191 | assert_equals(host.querySelector('a-b').customElementRegistry, win.customElements); |
192 | 192 | assert_equals(host.firstElementChild.customElementRegistry, null); |
193 | 193 | }, 'Global registry element with element parent with custom element registry attribute (null registry) ' + operationName); |
194 | 194 |
|
195 | | - test ((test) => { |
| 195 | + test (test => { |
196 | 196 | const [win, host] = operation(addGlobalRegistryChild(createParentElementWithRegistryAttribute(customElements)), test); |
197 | 197 | assert_equals(host.querySelector('a-b').customElementRegistry, win.customElements); |
198 | 198 | assert_equals(host.firstElementChild.customElementRegistry, win.customElements); |
199 | 199 | }, 'Global registry element with element parent with custom element registry attribute (global registry) ' + operationName); |
200 | 200 |
|
201 | | - test ((test) => { |
| 201 | + test (test => { |
202 | 202 | const [win, host] = operation(addGlobalRegistryChild(createParentElementWithRegistryAttribute(scopedRegistry)), test); |
203 | 203 | assert_equals(host.querySelector('a-b').customElementRegistry, win.customElements); |
204 | 204 | assert_equals(host.firstElementChild.customElementRegistry, scopedRegistry); |
205 | 205 | }, 'Global registry element with element parent with custom element registry attribute (scoped registry) ' + operationName); |
206 | 206 |
|
207 | | - test ((test) => { |
| 207 | + test (test => { |
208 | 208 | const [win, host] = operation(addGlobalRegistryChild(createParentElementWithoutRegistryAttribute(null)), test); |
209 | 209 | assert_equals(host.querySelector('a-b').customElementRegistry, win.customElements); |
210 | 210 | assert_equals(host.firstElementChild.customElementRegistry, win.customElements); |
211 | 211 | }, 'Global registry element with element parent without custom element registry attribute (null registry) ' + operationName); |
212 | 212 |
|
213 | | - test((test) => { |
| 213 | + test(test => { |
214 | 214 | const [win, host] = operation(addGlobalRegistryChild(createParentElementWithoutRegistryAttribute(customElements)), test); |
215 | 215 | assert_equals(host.querySelector('a-b').customElementRegistry, win.customElements); |
216 | 216 | assert_equals(host.firstElementChild.customElementRegistry, win.customElements); |
217 | 217 | }, 'Global registry element with element parent without custom element registry attribute (global registry) ' + operationName); |
218 | 218 |
|
219 | | - test((test) => { |
| 219 | + test(test => { |
220 | 220 | const [win, host] = operation(addGlobalRegistryChild(createParentElementWithoutRegistryAttribute(scopedRegistry)), test); |
221 | 221 | assert_equals(host.querySelector('a-b').customElementRegistry, win.customElements); |
222 | 222 | assert_equals(host.firstElementChild.customElementRegistry, scopedRegistry); |
223 | 223 | }, 'Global registry element with element parent without custom element registry attribute (scoped registry) ' + operationName); |
224 | 224 |
|
225 | | - test((test) => { |
| 225 | + test(test => { |
226 | 226 | const [win, host] = operation(addGlobalRegistryChild(createParentDeclarativeShadowRootWithoutRegistryAttribute()), test); |
227 | 227 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, win.customElements); |
228 | 228 | assert_equals(host.shadowRoot.customElementRegistry, win.customElements); |
229 | 229 | }, 'Global registry element with declarative shadow root parent without custom element registry attribute ' + operationName); |
230 | 230 |
|
231 | | - test((test) => { |
| 231 | + test(test => { |
232 | 232 | const [win, host] = operation(addGlobalRegistryChild(createParentDeclarativeShadowRootWithRegistryAttribute(null)), test); |
233 | 233 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, win.customElements); |
234 | 234 | assert_equals(host.shadowRoot.customElementRegistry, null); |
235 | 235 | }, 'Global registry element with declarative shadow root parent with custom element registry attribute (null registry) ' + operationName); |
236 | 236 |
|
237 | | - test((test) => { |
| 237 | + test(test => { |
238 | 238 | const [win, host] = operation(addGlobalRegistryChild(createParentDeclarativeShadowRootWithRegistryAttribute(customElements)), test); |
239 | 239 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, win.customElements); |
240 | 240 | assert_equals(host.shadowRoot.customElementRegistry, win.customElements); |
241 | 241 | }, 'Global registry element with declarative shadow root parent with custom element registry attribute (global registry) ' + operationName); |
242 | 242 |
|
243 | | - test((test) => { |
| 243 | + test(test => { |
244 | 244 | const [win, host] = operation(addGlobalRegistryChild(createParentDeclarativeShadowRootWithRegistryAttribute(scopedRegistry)), test); |
245 | 245 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, win.customElements); |
246 | 246 | assert_equals(host.shadowRoot.customElementRegistry, scopedRegistry); |
247 | 247 | }, 'Global registry element with declarative shadow root parent with custom element registry attribute (scoped registry) ' + operationName); |
248 | 248 |
|
249 | | - test((test) => { |
| 249 | + test(test => { |
250 | 250 | const [win, host] = operation(addGlobalRegistryChild(createParentImperativeShadowRoot(null)), test); |
251 | 251 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, win.customElements); |
252 | 252 | assert_equals(host.shadowRoot.customElementRegistry, win.customElements); |
253 | 253 | }, 'Global registry element with imperative shadow root parent (null registry) ' + operationName); |
254 | 254 |
|
255 | | - test((test) => { |
| 255 | + test(test => { |
256 | 256 | const [win, host] = operation(addGlobalRegistryChild(createParentImperativeShadowRoot(customElements)), test); |
257 | 257 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, win.customElements); |
258 | 258 | assert_equals(host.shadowRoot.customElementRegistry, win.customElements); |
259 | 259 | }, 'Global registry element with imperative shadow root parent (global registry) ' + operationName); |
260 | 260 |
|
261 | | - test((test) => { |
| 261 | + test(test => { |
262 | 262 | const [win, host] = operation(addGlobalRegistryChild(createParentImperativeShadowRoot(scopedRegistry)), test); |
263 | 263 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, win.customElements); |
264 | 264 | assert_equals(host.shadowRoot.customElementRegistry, scopedRegistry); |
265 | 265 | }, 'Global registry element with imperative shadow root parent (scoped registry) ' + operationName); |
266 | 266 |
|
267 | 267 | // Scoped registry child tests |
268 | | - test ((test) => { |
| 268 | + test (test => { |
269 | 269 | const [win, host] = operation(addScopedRegistryChild(createParentElementWithRegistryAttribute(null)), test); |
270 | 270 | assert_equals(host.querySelector('a-b').customElementRegistry, scopedRegistry); |
271 | 271 | assert_equals(host.firstElementChild.customElementRegistry, null); |
272 | 272 | }, 'Scoped registry element with element parent with custom element registry attribute (null registry) ' + operationName); |
273 | 273 |
|
274 | | - test ((test) => { |
| 274 | + test (test => { |
275 | 275 | const [win, host] = operation(addScopedRegistryChild(createParentElementWithRegistryAttribute(customElements)), test); |
276 | 276 | assert_equals(host.querySelector('a-b').customElementRegistry, scopedRegistry); |
277 | 277 | assert_equals(host.firstElementChild.customElementRegistry, win.customElements); |
278 | 278 | }, 'Scoped registry element with element parent with custom element registry attribute (global registry) ' + operationName); |
279 | 279 |
|
280 | | - test ((test) => { |
| 280 | + test (test => { |
281 | 281 | const [win, host] = operation(addScopedRegistryChild(createParentElementWithRegistryAttribute(scopedRegistry)), test); |
282 | 282 | assert_equals(host.querySelector('a-b').customElementRegistry, scopedRegistry); |
283 | 283 | assert_equals(host.firstElementChild.customElementRegistry, scopedRegistry); |
284 | 284 | }, 'Scoped registry element with element parent with custom element registry attribute (scoped registry) ' + operationName); |
285 | 285 |
|
286 | | - test ((test) => { |
| 286 | + test (test => { |
287 | 287 | const [win, host] = operation(addScopedRegistryChild(createParentElementWithoutRegistryAttribute(null)), test); |
288 | 288 | assert_equals(host.querySelector('a-b').customElementRegistry, scopedRegistry); |
289 | 289 | assert_equals(host.firstElementChild.customElementRegistry, win.customElements); |
290 | 290 | }, 'Scoped registry element with element parent without custom element registry attribute (null registry) ' + operationName); |
291 | 291 |
|
292 | | - test((test) => { |
| 292 | + test(test => { |
293 | 293 | const [win, host] = operation(addScopedRegistryChild(createParentElementWithoutRegistryAttribute(customElements)), test); |
294 | 294 | assert_equals(host.querySelector('a-b').customElementRegistry, scopedRegistry); |
295 | 295 | assert_equals(host.firstElementChild.customElementRegistry, win.customElements); |
296 | 296 | }, 'Scoped registry element with element parent without custom element registry attribute (global registry) ' + operationName); |
297 | 297 |
|
298 | | - test((test) => { |
| 298 | + test(test => { |
299 | 299 | const [win, host] = operation(addScopedRegistryChild(createParentElementWithoutRegistryAttribute(scopedRegistry)), test); |
300 | 300 | assert_equals(host.querySelector('a-b').customElementRegistry, scopedRegistry); |
301 | 301 | assert_equals(host.firstElementChild.customElementRegistry, scopedRegistry); |
302 | 302 | }, 'Scoped registry element with element parent without custom element registry attribute (scoped registry) ' + operationName); |
303 | 303 |
|
304 | | - test((test) => { |
| 304 | + test(test => { |
305 | 305 | const [win, host] = operation(addScopedRegistryChild(createParentDeclarativeShadowRootWithoutRegistryAttribute()), test); |
306 | 306 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, scopedRegistry); |
307 | 307 | assert_equals(host.shadowRoot.customElementRegistry, win.customElements); |
308 | 308 | }, 'Scoped registry element with declarative shadow root parent without custom element registry attribute ' + operationName); |
309 | 309 |
|
310 | | - test((test) => { |
| 310 | + test(test => { |
311 | 311 | const [win, host] = operation(addScopedRegistryChild(createParentDeclarativeShadowRootWithRegistryAttribute(null)), test); |
312 | 312 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, scopedRegistry); |
313 | 313 | assert_equals(host.shadowRoot.customElementRegistry, null); |
314 | 314 | }, 'Scoped registry element with declarative shadow root parent with custom element registry attribute (null registry) ' + operationName); |
315 | 315 |
|
316 | | - test((test) => { |
| 316 | + test(test => { |
317 | 317 | const [win, host] = operation(addScopedRegistryChild(createParentDeclarativeShadowRootWithRegistryAttribute(customElements)), test); |
318 | 318 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, scopedRegistry); |
319 | 319 | assert_equals(host.shadowRoot.customElementRegistry, win.customElements); |
320 | 320 | }, 'Scoped registry element with declarative shadow root parent with custom element registry attribute (global registry) ' + operationName); |
321 | 321 |
|
322 | | - test((test) => { |
| 322 | + test(test => { |
323 | 323 | const [win, host] = operation(addScopedRegistryChild(createParentDeclarativeShadowRootWithRegistryAttribute(scopedRegistry)), test); |
324 | 324 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, scopedRegistry); |
325 | 325 | assert_equals(host.shadowRoot.customElementRegistry, scopedRegistry); |
326 | 326 | }, 'Scoped registry element with declarative shadow root parent with custom element registry attribute (scoped registry) ' + operationName); |
327 | 327 |
|
328 | | - test((test) => { |
| 328 | + test(test => { |
329 | 329 | const [win, host] = operation(addScopedRegistryChild(createParentImperativeShadowRoot(null)), test); |
330 | 330 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, scopedRegistry); |
331 | 331 | assert_equals(host.shadowRoot.customElementRegistry, win.customElements); |
332 | 332 | }, 'Scoped registry element with imperative shadow root parent (null registry) ' + operationName); |
333 | 333 |
|
334 | | - test((test) => { |
| 334 | + test(test => { |
335 | 335 | const [win, host] = operation(addScopedRegistryChild(createParentImperativeShadowRoot(customElements)), test); |
336 | 336 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, scopedRegistry); |
337 | 337 | assert_equals(host.shadowRoot.customElementRegistry, win.customElements); |
338 | 338 | }, 'Scoped registry element with imperative shadow root parent (global registry) ' + operationName); |
339 | 339 |
|
340 | | - test((test) => { |
| 340 | + test(test => { |
341 | 341 | const [win, host] = operation(addScopedRegistryChild(createParentImperativeShadowRoot(scopedRegistry)), test); |
342 | 342 | assert_equals(host.shadowRoot.querySelector('a-b').customElementRegistry, scopedRegistry); |
343 | 343 | assert_equals(host.shadowRoot.customElementRegistry, scopedRegistry); |
|
0 commit comments