|
57 | 57 | var r_1; |
58 | 58 | // light |
59 | 59 | var r_1_l; |
| 60 | + // shadow |
| 61 | + var r_1_l_0; |
| 62 | + var r_1_l_1; |
60 | 63 | // shadow |
61 | 64 | var r_1_0; |
62 | 65 | // light |
|
85 | 88 | r_0_1_l = r_0_1.querySelector('[shadow-template-id=x-shadow-host-root-0-1-light]'); |
86 | 89 | r_1 = r.shadowRoot.querySelector('[shadow-template-id=x-shadow-host-root-1]'); |
87 | 90 | r_1_l = r_1.querySelector('[shadow-template-id=x-shadow-host-root-1-light]'); |
| 91 | + r_1_l_0 = r_1_l.shadowRoot.querySelector('[shadow-template-id=x-shadow-host-root-1-light-0]'); |
| 92 | + r_1_l_1 = r_1_l.shadowRoot.querySelector('[shadow-template-id=x-shadow-host-root-1-light-1]'); |
88 | 93 | r_1_0 = r_1.shadowRoot.querySelector('[shadow-template-id=x-shadow-host-root-1-0]'); |
89 | 94 | r_1_0_l = r_1_0.querySelector('[shadow-template-id=x-shadow-host-root-1-0-light]'); |
90 | 95 | r_1_1 = r_1.shadowRoot.querySelector('[shadow-template-id=x-shadow-host-root-1-1]'); |
|
94 | 99 | }); |
95 | 100 |
|
96 | 101 | teardown(function() { |
97 | | - assert.equal(r_0_0.shadowRoot.activeElement, null); |
98 | | - assert.equal(r_0_1.shadowRoot.activeElement, null); |
99 | | - assert.equal(r_1_0.shadowRoot.activeElement, null); |
100 | | - assert.equal(r_1_1.shadowRoot.activeElement, null); |
101 | | - |
102 | 102 | document.body.removeChild(r); |
103 | 103 | }); |
104 | 104 |
|
|
120 | 120 | assert.equal(doc.activeElement, r); |
121 | 121 | assert.equal(r.shadowRoot.activeElement, null); |
122 | 122 | assert.equal(r_0.shadowRoot.activeElement, null); |
| 123 | + assert.equal(r_0_0.shadowRoot.activeElement, null); |
| 124 | + assert.equal(r_0_1.shadowRoot.activeElement, null); |
123 | 125 | assert.equal(r_1.shadowRoot.activeElement, null); |
| 126 | + assert.equal(r_1_0.shadowRoot.activeElement, null); |
| 127 | + assert.equal(r_1_1.shadowRoot.activeElement, null); |
124 | 128 | }); |
125 | 129 |
|
126 | 130 | test('r_l.focus()', function() { |
127 | 131 | r_l.focus(); |
128 | 132 |
|
129 | 133 | assert.equal(doc.activeElement, r_l); |
130 | | - assert.equal(r.shadowRoot.activeElement, null); |
| 134 | + assert.equal(r.shadowRoot.activeElement, r_l); |
131 | 135 | assert.equal(r_0.shadowRoot.activeElement, null); |
| 136 | + assert.equal(r_0_0.shadowRoot.activeElement, null); |
| 137 | + assert.equal(r_0_1.shadowRoot.activeElement, null); |
132 | 138 | assert.equal(r_1.shadowRoot.activeElement, null); |
| 139 | + assert.equal(r_1_0.shadowRoot.activeElement, null); |
| 140 | + assert.equal(r_1_1.shadowRoot.activeElement, null); |
133 | 141 | }); |
134 | 142 |
|
135 | 143 | test('r_0.focus()', function() { |
|
138 | 146 | assert.equal(doc.activeElement, r); |
139 | 147 | assert.equal(r.shadowRoot.activeElement, r_0); |
140 | 148 | assert.equal(r_0.shadowRoot.activeElement, null); |
| 149 | + assert.equal(r_0_0.shadowRoot.activeElement, null); |
| 150 | + assert.equal(r_0_1.shadowRoot.activeElement, null); |
141 | 151 | assert.equal(r_1.shadowRoot.activeElement, null); |
| 152 | + assert.equal(r_1_0.shadowRoot.activeElement, null); |
| 153 | + assert.equal(r_1_1.shadowRoot.activeElement, null); |
142 | 154 | }); |
143 | 155 |
|
144 | 156 | test('r_0_l.focus()', function() { |
145 | 157 | r_0_l.focus(); |
146 | 158 |
|
147 | 159 | assert.equal(doc.activeElement, r); |
148 | 160 | assert.equal(r.shadowRoot.activeElement, r_0_l); |
149 | | - assert.equal(r_0.shadowRoot.activeElement, null); |
| 161 | + assert.equal(r_0.shadowRoot.activeElement, r_0_l); |
| 162 | + assert.equal(r_0_0.shadowRoot.activeElement, null); |
| 163 | + assert.equal(r_0_1.shadowRoot.activeElement, null); |
150 | 164 | assert.equal(r_1.shadowRoot.activeElement, null); |
| 165 | + assert.equal(r_1_0.shadowRoot.activeElement, null); |
| 166 | + assert.equal(r_1_1.shadowRoot.activeElement, null); |
151 | 167 | }); |
152 | 168 |
|
153 | 169 | test('r_0_0.focus()', function() { |
|
156 | 172 | assert.equal(doc.activeElement, r); |
157 | 173 | assert.equal(r.shadowRoot.activeElement, r_0); |
158 | 174 | assert.equal(r_0.shadowRoot.activeElement, r_0_0); |
| 175 | + assert.equal(r_0_0.shadowRoot.activeElement, null); |
| 176 | + assert.equal(r_0_1.shadowRoot.activeElement, null); |
159 | 177 | assert.equal(r_1.shadowRoot.activeElement, null); |
| 178 | + assert.equal(r_1_0.shadowRoot.activeElement, null); |
| 179 | + assert.equal(r_1_1.shadowRoot.activeElement, null); |
160 | 180 | }); |
161 | 181 |
|
162 | 182 | test('r_0_0_l.focus()', function() { |
|
165 | 185 | assert.equal(doc.activeElement, r); |
166 | 186 | assert.equal(r.shadowRoot.activeElement, r_0); |
167 | 187 | assert.equal(r_0.shadowRoot.activeElement, r_0_0_l); |
| 188 | + assert.equal(r_0_0.shadowRoot.activeElement, r_0_0_l); |
| 189 | + assert.equal(r_0_1.shadowRoot.activeElement, null); |
168 | 190 | assert.equal(r_1.shadowRoot.activeElement, null); |
| 191 | + assert.equal(r_1_0.shadowRoot.activeElement, null); |
| 192 | + assert.equal(r_1_1.shadowRoot.activeElement, null); |
169 | 193 | }); |
170 | 194 |
|
171 | 195 | test('r_0_1.focus()', function() { |
|
174 | 198 | assert.equal(doc.activeElement, r); |
175 | 199 | assert.equal(r.shadowRoot.activeElement, r_0); |
176 | 200 | assert.equal(r_0.shadowRoot.activeElement, r_0_1); |
| 201 | + assert.equal(r_0_0.shadowRoot.activeElement, null); |
| 202 | + assert.equal(r_0_1.shadowRoot.activeElement, null); |
177 | 203 | assert.equal(r_1.shadowRoot.activeElement, null); |
| 204 | + assert.equal(r_1_0.shadowRoot.activeElement, null); |
| 205 | + assert.equal(r_1_1.shadowRoot.activeElement, null); |
178 | 206 | }); |
179 | 207 |
|
180 | 208 | test('r_0_1_l.focus()', function() { |
|
183 | 211 | assert.equal(doc.activeElement, r); |
184 | 212 | assert.equal(r.shadowRoot.activeElement, r_0); |
185 | 213 | assert.equal(r_0.shadowRoot.activeElement, r_0_1_l); |
| 214 | + assert.equal(r_0_0.shadowRoot.activeElement, null); |
| 215 | + assert.equal(r_0_1.shadowRoot.activeElement, r_0_1_l); |
186 | 216 | assert.equal(r_1.shadowRoot.activeElement, null); |
| 217 | + assert.equal(r_1_0.shadowRoot.activeElement, null); |
| 218 | + assert.equal(r_1_1.shadowRoot.activeElement, null); |
187 | 219 | }); |
188 | 220 |
|
189 | 221 | test('r_1.focus()', function() { |
|
192 | 224 | assert.equal(doc.activeElement, r); |
193 | 225 | assert.equal(r.shadowRoot.activeElement, r_1); |
194 | 226 | assert.equal(r_0.shadowRoot.activeElement, null); |
| 227 | + assert.equal(r_0_0.shadowRoot.activeElement, null); |
| 228 | + assert.equal(r_0_1.shadowRoot.activeElement, null); |
195 | 229 | assert.equal(r_1.shadowRoot.activeElement, null); |
| 230 | + assert.equal(r_1_0.shadowRoot.activeElement, null); |
| 231 | + assert.equal(r_1_1.shadowRoot.activeElement, null); |
196 | 232 | }); |
197 | 233 |
|
198 | 234 | test('r_1_l.focus()', function() { |
|
201 | 237 | assert.equal(doc.activeElement, r); |
202 | 238 | assert.equal(r.shadowRoot.activeElement, r_1_l); |
203 | 239 | assert.equal(r_0.shadowRoot.activeElement, null); |
204 | | - assert.equal(r_1_l.shadowRoot.activeElement, null); |
| 240 | + assert.equal(r_0_0.shadowRoot.activeElement, null); |
| 241 | + assert.equal(r_0_1.shadowRoot.activeElement, null); |
| 242 | + assert.equal(r_1.shadowRoot.activeElement, r_1_l); |
| 243 | + assert.equal(r_1_0.shadowRoot.activeElement, null); |
| 244 | + assert.equal(r_1_1.shadowRoot.activeElement, null); |
| 245 | + }); |
| 246 | + |
| 247 | + test('r_1_l_0.focus()', function() { |
| 248 | + r_1_l_0.focus(); |
| 249 | + |
| 250 | + assert.equal(doc.activeElement, r); |
| 251 | + assert.equal(r.shadowRoot.activeElement, r_1_l); |
| 252 | + assert.equal(r_0.shadowRoot.activeElement, null); |
| 253 | + assert.equal(r_0_0.shadowRoot.activeElement, null); |
| 254 | + assert.equal(r_0_1.shadowRoot.activeElement, null); |
| 255 | + assert.equal(r_1.shadowRoot.activeElement, r_1_l); |
| 256 | + assert.equal(r_1_l.shadowRoot.activeElement, r_1_l_0); |
| 257 | + assert.equal(r_1_0.shadowRoot.activeElement, null); |
| 258 | + assert.equal(r_1_1.shadowRoot.activeElement, null); |
| 259 | + }); |
| 260 | + |
| 261 | + test('r_1_l_1.focus()', function() { |
| 262 | + r_1_l_1.focus(); |
| 263 | + |
| 264 | + assert.equal(doc.activeElement, r); |
| 265 | + assert.equal(r.shadowRoot.activeElement, r_1_l); |
| 266 | + assert.equal(r_0.shadowRoot.activeElement, null); |
| 267 | + assert.equal(r_0_0.shadowRoot.activeElement, null); |
| 268 | + assert.equal(r_0_1.shadowRoot.activeElement, null); |
| 269 | + assert.equal(r_1.shadowRoot.activeElement, r_1_l); |
| 270 | + assert.equal(r_1_l.shadowRoot.activeElement, r_1_l_1); |
| 271 | + assert.equal(r_1_0.shadowRoot.activeElement, null); |
| 272 | + assert.equal(r_1_1.shadowRoot.activeElement, null); |
205 | 273 | }); |
206 | 274 |
|
207 | 275 | test('r_1_0.focus()', function() { |
|
210 | 278 | assert.equal(doc.activeElement, r); |
211 | 279 | assert.equal(r.shadowRoot.activeElement, r_1); |
212 | 280 | assert.equal(r_0.shadowRoot.activeElement, null); |
| 281 | + assert.equal(r_0_0.shadowRoot.activeElement, null); |
| 282 | + assert.equal(r_0_1.shadowRoot.activeElement, null); |
213 | 283 | assert.equal(r_1.shadowRoot.activeElement, r_1_0); |
| 284 | + assert.equal(r_1_0.shadowRoot.activeElement, null); |
| 285 | + assert.equal(r_1_1.shadowRoot.activeElement, null); |
214 | 286 | }); |
215 | 287 |
|
216 | 288 | test('r_1_0_l.focus()', function() { |
|
219 | 291 | assert.equal(doc.activeElement, r); |
220 | 292 | assert.equal(r.shadowRoot.activeElement, r_1); |
221 | 293 | assert.equal(r_0.shadowRoot.activeElement, null); |
| 294 | + assert.equal(r_0_0.shadowRoot.activeElement, null); |
| 295 | + assert.equal(r_0_1.shadowRoot.activeElement, null); |
222 | 296 | assert.equal(r_1.shadowRoot.activeElement, r_1_0_l); |
| 297 | + assert.equal(r_1_0.shadowRoot.activeElement, r_1_0_l); |
| 298 | + assert.equal(r_1_1.shadowRoot.activeElement, null); |
223 | 299 | }); |
224 | 300 |
|
225 | 301 | test('r_1_1.focus()', function() { |
|
228 | 304 | assert.equal(doc.activeElement, r); |
229 | 305 | assert.equal(r.shadowRoot.activeElement, r_1); |
230 | 306 | assert.equal(r_0.shadowRoot.activeElement, null); |
| 307 | + assert.equal(r_0_0.shadowRoot.activeElement, null); |
| 308 | + assert.equal(r_0_1.shadowRoot.activeElement, null); |
231 | 309 | assert.equal(r_1.shadowRoot.activeElement, r_1_1); |
| 310 | + assert.equal(r_1_0.shadowRoot.activeElement, null); |
| 311 | + assert.equal(r_1_1.shadowRoot.activeElement, null); |
232 | 312 | }); |
233 | 313 |
|
234 | 314 | test('r_1_1_l.focus()', function() { |
|
237 | 317 | assert.equal(doc.activeElement, r); |
238 | 318 | assert.equal(r.shadowRoot.activeElement, r_1); |
239 | 319 | assert.equal(r_0.shadowRoot.activeElement, null); |
| 320 | + assert.equal(r_0_0.shadowRoot.activeElement, null); |
| 321 | + assert.equal(r_0_1.shadowRoot.activeElement, null); |
240 | 322 | assert.equal(r_1.shadowRoot.activeElement, r_1_1_l); |
| 323 | + assert.equal(r_1_0.shadowRoot.activeElement, null); |
| 324 | + assert.equal(r_1_1.shadowRoot.activeElement, r_1_1_l); |
241 | 325 | }); |
242 | 326 | }); |
243 | 327 |
|
|
249 | 333 | <div> |
250 | 334 | <div> |
251 | 335 | <div shadow-template-id="x-shadow-host-root-0"> |
252 | | - <div shadow-template-id="x-shadow-host-root-0-light"></div> |
| 336 | + <div> |
| 337 | + <div shadow-template-id="x-shadow-host-root-0-light"></div> |
| 338 | + </div> |
253 | 339 | </div> |
254 | 340 | </div> |
255 | 341 | </div> |
256 | 342 | <div> |
257 | 343 | <div shadow-template-id="x-shadow-host-root-1"> |
258 | | - <div shadow-template-id="x-shadow-host-root-1-light"></div> |
| 344 | + <div> |
| 345 | + <div shadow-template-id="x-shadow-host-root-1-light"></div> |
| 346 | + </div> |
259 | 347 | </div> |
260 | 348 | </div> |
261 | 349 | </template> |
|
266 | 354 | <content></content> |
267 | 355 | <div> |
268 | 356 | <div shadow-template-id="x-shadow-host-root-0-0"> |
269 | | - <div shadow-template-id="x-shadow-host-root-0-0-light"></div> |
| 357 | + <div> |
| 358 | + <div> |
| 359 | + <div shadow-template-id="x-shadow-host-root-0-0-light"></div> |
| 360 | + </div> |
| 361 | + </div> |
270 | 362 | </div> |
271 | 363 | </div> |
272 | 364 | <div shadow-template-id="x-shadow-host-root-0-1"> |
|
292 | 384 | <content></content> |
293 | 385 | <div> |
294 | 386 | <div shadow-template-id="x-shadow-host-root-1-0"> |
295 | | - <div shadow-template-id="x-shadow-host-root-1-0-light"></div> |
| 387 | + <div> |
| 388 | + <div> |
| 389 | + <div shadow-template-id="x-shadow-host-root-1-0-light"></div> |
| 390 | + </div> |
| 391 | + </div> |
296 | 392 | </div> |
297 | 393 | </div> |
298 | 394 | <div> |
299 | 395 | <div> |
300 | 396 | <div> |
301 | 397 | <div shadow-template-id="x-shadow-host-root-1-1"> |
302 | | - <div shadow-template-id="x-shadow-host-root-1-1-light"></div> |
| 398 | + <div> |
| 399 | + <div shadow-template-id="x-shadow-host-root-1-1-light"></div> |
| 400 | + </div> |
303 | 401 | </div> |
304 | 402 | </div> |
305 | 403 | </div> |
306 | 404 | </div> |
307 | 405 | </template> |
308 | 406 |
|
309 | | -<template id="x-shadow-host-root-1-light"></template> |
| 407 | +<template id="x-shadow-host-root-1-light"> |
| 408 | + <content></content> |
| 409 | + <div shadow-template-id="x-shadow-host-root-1-light-0"></div> |
| 410 | + <div> |
| 411 | + <div shadow-template-id="x-shadow-host-root-1-light-1"></div> |
| 412 | + </div> |
| 413 | +</template> |
| 414 | + |
| 415 | +<template id="x-shadow-host-root-1-light-0"></template> |
| 416 | + |
| 417 | +<template id="x-shadow-host-root-1-light-1"></template> |
310 | 418 |
|
311 | 419 | <template id="x-shadow-host-root-1-0"> |
312 | 420 | <content></content> |
|
0 commit comments