OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Shadow DOM: Firing an event inside a node assigned to a slot</title> | 4 <title>Shadow DOM: Firing an event inside a node assigned to a slot</title> |
5 <meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> | 5 <meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> |
6 <meta name="assert" content="The event path calculation algorithm must be us
ed to determine event path"> | 6 <meta name="assert" content="The event path calculation algorithm must be us
ed to determine event path"> |
7 <link rel="help" href="https://w3c.github.io/webcomponents/spec/shadow/#even
t-paths"> | 7 <link rel="help" href="https://w3c.github.io/webcomponents/spec/shadow/#even
t-paths"> |
8 <script src="/resources/testharness.js"></script> | 8 <script src="/resources/testharness.js"></script> |
9 <script src="/resources/testharnessreport.js"></script> | 9 <script src="/resources/testharnessreport.js"></script> |
10 </head> | 10 </head> |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 assert_array_equals(log[3], [shadow.innerShadow.host, shadow.inn
erShadow.host], 'EventPath[3] must be the inner shadow host'); | 233 assert_array_equals(log[3], [shadow.innerShadow.host, shadow.inn
erShadow.host], 'EventPath[3] must be the inner shadow host'); |
234 assert_array_equals(log[4], [shadow.lowerShadow.firstChild, shad
ow.innerShadow.host], 'EventPath[4] must be the parent of the inner shadow host'
); | 234 assert_array_equals(log[4], [shadow.lowerShadow.firstChild, shad
ow.innerShadow.host], 'EventPath[4] must be the parent of the inner shadow host'
); |
235 assert_array_equals(log[5], [shadow.lowerShadow, shadow.innerSha
dow.host], 'EventPath[5] must be the lower (but outer) shadow root'); | 235 assert_array_equals(log[5], [shadow.lowerShadow, shadow.innerSha
dow.host], 'EventPath[5] must be the lower (but outer) shadow root'); |
236 assert_array_equals(log[6], [shadow.lowerShadow.host, shadow.low
erShadow.host], 'EventPath[6] must be the lower (but outer) shadow root'); | 236 assert_array_equals(log[6], [shadow.lowerShadow.host, shadow.low
erShadow.host], 'EventPath[6] must be the lower (but outer) shadow root'); |
237 assert_array_equals(log[7], [shadow.host.firstChild, shadow.lowe
rShadow.host], 'EventPath[7] must be the slot inside the upper shadow tree'); | 237 assert_array_equals(log[7], [shadow.host.firstChild, shadow.lowe
rShadow.host], 'EventPath[7] must be the slot inside the upper shadow tree'); |
238 assert_array_equals(log[8], [shadow.upperSlot, shadow.lowerShado
w.host], 'EventPath[8] must be the slot inside the upper shadow tree'); | 238 assert_array_equals(log[8], [shadow.upperSlot, shadow.lowerShado
w.host], 'EventPath[8] must be the slot inside the upper shadow tree'); |
239 assert_array_equals(log[9], [shadow.upperSlot.parentNode, shadow
.lowerShadow.host], 'EventPath[9] must be the parent of the slot inside the uppe
r shadow tree'); | 239 assert_array_equals(log[9], [shadow.upperSlot.parentNode, shadow
.lowerShadow.host], 'EventPath[9] must be the parent of the slot inside the uppe
r shadow tree'); |
240 assert_array_equals(log[10], [shadow.upperShadow, shadow.lowerSh
adow.host], 'EventPath[10] must be the upper shadow root'); | 240 assert_array_equals(log[10], [shadow.upperShadow, shadow.lowerSh
adow.host], 'EventPath[10] must be the upper shadow root'); |
241 assert_array_equals(log[11], [shadow.upperShadow.host, shadow.lo
werShadow.host], 'EventPath[11] must be the host'); | 241 assert_array_equals(log[11], [shadow.upperShadow.host, shadow.lo
werShadow.host], 'EventPath[11] must be the host'); |
242 | 242 |
243 }, 'Firing an event on a node with two ancestors with a detached ' +
outerUpperMode + ' and ' + outerLowerMode | 243 }, 'Firing an event on a node within a ' + innerMode + ' shadow tree
that is itself a ' + outerLowerMode |
244 + ' shadow trees with an inner ' + innerMode + ' shadow tree'); | 244 + ' shadow tree (the latter being the descendent of a host for a
separate ' + outerUpperMode + ' shadow tree)'); |
245 } | 245 } |
246 | 246 |
247 testEventInsideNestedShadowsUnderAnotherShadow('open', 'open', 'open'); | 247 testEventInsideNestedShadowsUnderAnotherShadow('open', 'open', 'open'); |
248 testEventInsideNestedShadowsUnderAnotherShadow('open', 'open', 'closed')
; | 248 testEventInsideNestedShadowsUnderAnotherShadow('open', 'open', 'closed')
; |
249 testEventInsideNestedShadowsUnderAnotherShadow('open', 'closed', 'open')
; | 249 testEventInsideNestedShadowsUnderAnotherShadow('open', 'closed', 'open')
; |
250 testEventInsideNestedShadowsUnderAnotherShadow('open', 'closed', 'closed
'); | 250 testEventInsideNestedShadowsUnderAnotherShadow('open', 'closed', 'closed
'); |
251 testEventInsideNestedShadowsUnderAnotherShadow('closed', 'open', 'open')
; | 251 testEventInsideNestedShadowsUnderAnotherShadow('closed', 'open', 'open')
; |
252 testEventInsideNestedShadowsUnderAnotherShadow('closed', 'open', 'closed
'); | 252 testEventInsideNestedShadowsUnderAnotherShadow('closed', 'open', 'closed
'); |
253 testEventInsideNestedShadowsUnderAnotherShadow('closed', 'closed', 'open
'); | 253 testEventInsideNestedShadowsUnderAnotherShadow('closed', 'closed', 'open
'); |
254 testEventInsideNestedShadowsUnderAnotherShadow('closed', 'closed', 'clos
ed'); | 254 testEventInsideNestedShadowsUnderAnotherShadow('closed', 'closed', 'clos
ed'); |
255 | 255 |
256 </script> | 256 </script> |
257 </body> | 257 </body> |
258 </html> | 258 </html> |
OLD | NEW |