gecko-dev/testing/web-platform/tests/shadow-dom/event-inside-slotted-node.html

259 строки
14 KiB
HTML
Исходник Обычный вид История

Bug 1309931 - Update web-platform-tests to revision 1d8e28e2c762b51c06670a373b23af6bd7a8aed7, a=testonly MozReview-Commit-ID: 17dwWFxkprQ --HG-- rename : testing/web-platform/tests/conformance-checkers/html-svg/animate-dom-01-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/animate-dom-01-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/animate-dom-02-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/animate-dom-02-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/animate-elem-40-t-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/animate-elem-40-t-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/animate-script-elem-01-b-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/animate-script-elem-01-b-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/animate-struct-dom-01-b-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/animate-struct-dom-01-b-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/conform-viewers-02-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/conform-viewers-02-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/coords-dom-03-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/coords-dom-03-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/interact-events-02-b-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/interact-events-02-b-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/interact-pevents-01-b-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/interact-pevents-01-b-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/interact-pevents-03-b-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/interact-pevents-03-b-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/interact-pevents-05-b-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/interact-pevents-05-b-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/interact-pevents-07-t-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/interact-pevents-07-t-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/interact-pevents-08-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/interact-pevents-08-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/interact-pevents-09-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/interact-pevents-09-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/interact-pointer-01-t-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/interact-pointer-01-t-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/interact-pointer-03-t-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/interact-pointer-03-t-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/masking-path-09-b-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/masking-path-09-b-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/paths-dom-01-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/paths-dom-01-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/paths-dom-02-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/paths-dom-02-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/struct-cond-02-t-isvalid.html => testing/web-platform/tests/conformance-checkers/html-svg/struct-cond-02-t-haswarn.html rename : testing/web-platform/tests/conformance-checkers/html-svg/struct-dom-07-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/struct-dom-07-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/struct-dom-08-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/struct-dom-08-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/struct-dom-11-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/struct-dom-11-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/struct-dom-13-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/struct-dom-13-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/struct-dom-14-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/struct-dom-14-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/struct-dom-15-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/struct-dom-15-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/struct-dom-20-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/struct-dom-20-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/struct-use-13-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/struct-use-13-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/text-dom-02-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/text-dom-02-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/text-dom-05-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/text-dom-05-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/text-tselect-02-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/text-tselect-02-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/text-tselect-03-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/text-tselect-03-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/types-dom-02-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/types-dom-02-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/types-dom-03-b-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/types-dom-03-b-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/types-dom-05-b-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/types-dom-05-b-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/types-dom-07-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/types-dom-07-f-isvalid.html rename : testing/web-platform/tests/conformance-checkers/html-svg/types-dom-08-f-novalid.html => testing/web-platform/tests/conformance-checkers/html-svg/types-dom-08-f-isvalid.html rename : testing/web-platform/tests/encrypted-media/Google/encrypted-media-utils.js => testing/web-platform/tests/encrypted-media/Google/migrated_to_root_disabled/encrypted-media-utils.js rename : testing/web-platform/tests/html/browsers/history/the-history-interface/non-automated/traverse_the_session_history_unload_prompt_1.html => testing/web-platform/tests/html/browsers/history/the-history-interface/non-automated/traverse_the_session_history_unload_prompt_1-manual.html rename : testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-scrollamount-effect.html => testing/web-platform/tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-scrollamount-effect-manual.html rename : testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_000.htm => testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_000-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_001.htm => testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_001-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_002.htm => testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_002-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_003.htm => testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_003-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_004.htm => testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_004-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_005.htm => testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_005-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_006.htm => testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_006-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_007.htm => testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_007-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_008.htm => testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_008-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_009.htm => testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_009-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_010.htm => testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_010-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_011.htm => testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_011-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_012.htm => testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_012-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_013.htm => testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_013-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_014.htm => testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_014-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_015.htm => testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_015-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_016.htm => testing/web-platform/tests/old-tests/submission/Microsoft/dragdrop/dragdrop_016-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_003.htm => testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_003-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_004.htm => testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_004-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_006.htm => testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_006-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_007.htm => testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_007-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_008.htm => testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_008-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_009.htm => testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_009-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_010.htm => testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_010-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_020.htm => testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_020-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_021.htm => testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_021-manual.htm rename : testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_022.htm => testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_022-manual.htm rename : testing/web-platform/tests/pointerevents/pointerevent_pointermove-on-chorded-mouse-button.html => testing/web-platform/tests/pointerevents/pointerevent_pointermove_on_chorded_mouse_button-manual.html rename : testing/web-platform/tests/pointerevents/pointerevent_suppress_compat_events_on_click.html => testing/web-platform/tests/pointerevents/pointerevent_suppress_compat_events_on_click-manual.html rename : testing/web-platform/tests/pointerevents/pointerevent_suppress_compat_events_on_drag_mouse.html => testing/web-platform/tests/pointerevents/pointerevent_suppress_compat_events_on_drag_mouse-manual.html
2016-10-07 15:27:08 +03:00
<!DOCTYPE html>
<html>
<head>
<title>Shadow DOM: Firing an event inside a node assigned to a slot</title>
<meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org">
<meta name="assert" content="The event path calculation algorithm must be used to determine event path">
<link rel="help" href="https://w3c.github.io/webcomponents/spec/shadow/#event-paths">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="log"></div>
<script>
function dispatchEventWithLog(shadow, event) {
var log = [];
var attachedNodes = [];
for (var nodeKey in shadow) {
var startingNode = shadow[nodeKey];
for (var node = startingNode; node; node = node.parentNode) {
if (attachedNodes.indexOf(node) >= 0)
continue;
attachedNodes.push(node);
node.addEventListener(event.type, (function (event) {
log.push([this, event.target]);
}).bind(node));
}
}
shadow.target.dispatchEvent(event);
return log;
}
function element(name, children, className) {
var element = document.createElement(name);
if (className)
element.className = className;
if (children) {
for (var child of children)
element.appendChild(child);
}
return element;
}
function attachShadow(host, mode, children) {
var shadowRoot = host.attachShadow({mode: mode});
if (children) {
for (var child of children)
shadowRoot.appendChild(child);
}
return shadowRoot;
}
function createShadowHostWithAssignedGrandChild(mode) {
var host = element('div', [
element('b', [
element('i')
])
]);
var root = attachShadow(host, mode, [
element('span', [
element('slot')
])
]);
return {target: host.querySelector('i'), targetParent: host.querySelector('b'), host: host,
slot: root.querySelector('slot'), slotParent: root.querySelector('span'), root: root};
}
function testEventInDetachedShadowHostDescendant(mode) {
test(function () {
var shadow = createShadowHostWithAssignedGrandChild(mode);
log = dispatchEventWithLog(shadow, new Event('foo', {bubbles: true, composed: true}));
assert_equals(log.length, 6, 'EventPath must contain [target, target parent, slot, slot parent, shadow root, shadow host]');
assert_array_equals(log[0], [shadow.target, shadow.target], 'EventPath[0] must be the target');
assert_array_equals(log[1], [shadow.targetParent, shadow.target], 'EventPath[1] must be the parent of the target');
assert_array_equals(log[2], [shadow.slot, shadow.target], 'EventPath[2] must be the slot');
assert_array_equals(log[3], [shadow.slotParent, shadow.target], 'EventPath[3] must be the parent of the slot');
assert_array_equals(log[4], [shadow.root, shadow.target], 'EventPath[4] must be the shadow root');
assert_array_equals(log[5], [shadow.host, shadow.target], 'EventPath[5] must be the shadow host');
}, 'Firing an event inside a grand child of a detached ' + mode + ' mode shadow host');
}
testEventInDetachedShadowHostDescendant('open');
testEventInDetachedShadowHostDescendant('closed');
function testEventInShadowHostDescendantInsideDocument(mode) {
test(function () {
var shadow = createShadowHostWithAssignedGrandChild(mode);
document.body.appendChild(shadow.host);
log = dispatchEventWithLog(shadow, new Event('foo', {bubbles: true, composed: true}));
assert_equals(log.length, 9, 'EventPath must contain [target, target parent, slot, slot parent, shadow root, shadow host, body, html, document]');
assert_array_equals(log[0], [shadow.target, shadow.target], 'EventPath[0] must be the target');
assert_array_equals(log[1], [shadow.targetParent, shadow.target], 'EventPath[1] must be the parent of the target');
assert_array_equals(log[2], [shadow.slot, shadow.target], 'EventPath[2] must be the slot');
assert_array_equals(log[3], [shadow.slotParent, shadow.target], 'EventPath[3] must be the parent of the slot');
assert_array_equals(log[4], [shadow.root, shadow.target], 'EventPath[4] must be the shadow root');
assert_array_equals(log[5], [shadow.host, shadow.target], 'EventPath[5] must be the shadow host');
assert_array_equals(log[6], [document.body, shadow.target], 'EventPath[6] must be the body element');
assert_array_equals(log[7], [document.documentElement, shadow.target], 'EventPath[7] must be the html element');
assert_array_equals(log[8], [document, shadow.target], 'EventPath[8] must be the html element');
}, 'Firing an event inside a grand child of an in-document ' + mode + ' mode shadow host');
}
testEventInShadowHostDescendantInsideDocument('open');
testEventInShadowHostDescendantInsideDocument('closed');
function createNestedShadowTreesWithSlots(innerMode, outerUpperMode, outerLowerMode) {
var upperHost = element('upper-host', [
element('p', [
element('lower-host', [
element('a')
])
])
]);
var upperShadow = attachShadow(upperHost, outerUpperMode, [
element('b', [
element('slot', [], 'upper-slot')
])
]);
var lowerHost = upperHost.querySelector('lower-host');
var lowerShadow = attachShadow(lowerHost, outerLowerMode, [
element('em', [
element('inner-host', [
element('span', [
element('slot', [], 'lower-slot')
])
])
])
]);
innerShadow = attachShadow(lowerShadow.querySelector('inner-host'), innerMode, [
element('i', [
element('slot', [], 'inner-slot')
])
]);
return {
host: upperHost,
target: upperHost.querySelector('a'),
upperShadow: upperShadow,
upperSlot: upperShadow.querySelector('slot'),
lowerShadow: lowerShadow,
lowerSlot: lowerShadow.querySelector('slot'),
innerShadow: innerShadow,
innerSlot: innerShadow.querySelector('slot'),
};
}
/*
upper-host (14) -- (upperShadow; 13)
+ p (10) + b (12)
| + slot (upperSlot; 11)
+ lower-host (9) -- (lowerShadow; 8)
+ a (target; 0) + em (7)
+ inner-host (6) -------- (innerShadow; 5)
+ span (2) + i (4)
+ slot (lowerSlot; 1) + slot (innerSlot; 3)
*/
function testEventUnderTwoShadowRoots(outerUpperMode, outerLowerMode, innerMode) {
test(function () {
var shadow = createNestedShadowTreesWithSlots(innerMode, outerUpperMode, outerLowerMode);
log = dispatchEventWithLog(shadow, new Event('foo', {bubbles: true, composed: true}));
assert_equals(log.length, 15, 'EventPath must contain 15 targets');
assert_array_equals(log[0], [shadow.target, shadow.target], 'EventPath[0] must be the target');
assert_array_equals(log[1], [shadow.lowerSlot, shadow.target], 'EventPath[1] must be the slot inside the lower shadow tree');
assert_array_equals(log[2], [shadow.lowerSlot.parentNode, shadow.target], 'EventPath[2] must be the parent of the slot inside the lower shadow tree');
assert_array_equals(log[3], [shadow.innerSlot, shadow.target], 'EventPath[3] must be the slot inside the shadow tree inside the lower shadow tree');
assert_array_equals(log[4], [shadow.innerSlot.parentNode, shadow.target], 'EventPath[4] must be the child of the inner shadow root');
assert_array_equals(log[5], [shadow.innerShadow, shadow.target], 'EventPath[5] must be the inner shadow root');
assert_array_equals(log[6], [shadow.innerShadow.host, shadow.target], 'EventPath[6] must be the host of the inner shadow tree');
assert_array_equals(log[7], [shadow.lowerShadow.firstChild, shadow.target], 'EventPath[7] must be the parent of the inner shadow host');
assert_array_equals(log[8], [shadow.lowerShadow, shadow.target], 'EventPath[8] must be the lower shadow root');
assert_array_equals(log[9], [shadow.lowerShadow.host, shadow.target], 'EventPath[9] must be the lower shadow host');
assert_array_equals(log[10], [shadow.host.firstChild, shadow.target], 'EventPath[10] must be the parent of the grand parent of the target');
assert_array_equals(log[11], [shadow.upperSlot, shadow.target], 'EventPath[11] must be the slot inside the upper shadow tree');
assert_array_equals(log[12], [shadow.upperSlot.parentNode, shadow.target], 'EventPath[12] must be the parent of the slot inside the upper shadow tree');
assert_array_equals(log[13], [shadow.upperShadow, shadow.target], 'EventPath[13] must be the upper shadow root');
assert_array_equals(log[14], [shadow.host, shadow.target], 'EventPath[14] must be the host');
}, 'Firing an event on a node with two ancestors with a detached ' + outerUpperMode + ' and ' + outerLowerMode
+ ' shadow trees with an inner ' + innerMode + ' shadow tree');
}
testEventUnderTwoShadowRoots('open', 'open', 'open');
testEventUnderTwoShadowRoots('open', 'open', 'closed');
testEventUnderTwoShadowRoots('open', 'closed', 'open');
testEventUnderTwoShadowRoots('open', 'closed', 'closed');
testEventUnderTwoShadowRoots('closed', 'open', 'open');
testEventUnderTwoShadowRoots('closed', 'open', 'closed');
testEventUnderTwoShadowRoots('closed', 'closed', 'open');
testEventUnderTwoShadowRoots('closed', 'closed', 'closed');
/*
upper-host (11) -- (upperShadow; 10)
+ p (7) + b (9)
| + slot (upperSlot; 8)
+ lower-host (6) -- (lowerShadow; 5)
+ a + em (4)
+ inner-host (3) -- (innerShadow; 2)
+ span + i (1)
+ slot + slot (innerSlot, target; 0)
*/
function testEventInsideNestedShadowsUnderAnotherShadow(outerUpperMode, outerLowerMode, innerMode) {
test(function () {
var shadow = createNestedShadowTreesWithSlots(innerMode, outerUpperMode, outerLowerMode);
shadow.deepestNodeInLightDOM = shadow.target; // Needed for dispatchEventWithLog to attach event listeners.
shadow.target = shadow.innerSlot;
log = dispatchEventWithLog(shadow, new Event('foo', {bubbles: true, composed: true}));
assert_equals(log.length, 12, 'EventPath must contain 12 targets');
assert_array_equals(log[0], [shadow.target, shadow.target], 'EventPath[0] must be the target');
assert_array_equals(log[1], [shadow.target.parentNode, shadow.target], 'EventPath[1] must be the parent of the target');
assert_array_equals(log[2], [shadow.innerShadow, shadow.target], 'EventPath[2] must be the inner shadow root');
assert_array_equals(log[3], [shadow.innerShadow.host, shadow.innerShadow.host], 'EventPath[3] must be the inner shadow host');
assert_array_equals(log[4], [shadow.lowerShadow.firstChild, shadow.innerShadow.host], 'EventPath[4] must be the parent of the inner shadow host');
assert_array_equals(log[5], [shadow.lowerShadow, shadow.innerShadow.host], 'EventPath[5] must be the lower (but outer) shadow root');
assert_array_equals(log[6], [shadow.lowerShadow.host, shadow.lowerShadow.host], 'EventPath[6] must be the lower (but outer) shadow root');
assert_array_equals(log[7], [shadow.host.firstChild, shadow.lowerShadow.host], 'EventPath[7] must be the slot inside the upper shadow tree');
assert_array_equals(log[8], [shadow.upperSlot, shadow.lowerShadow.host], 'EventPath[8] must be the slot inside the upper shadow tree');
assert_array_equals(log[9], [shadow.upperSlot.parentNode, shadow.lowerShadow.host], 'EventPath[9] must be the parent of the slot inside the upper shadow tree');
assert_array_equals(log[10], [shadow.upperShadow, shadow.lowerShadow.host], 'EventPath[10] must be the upper shadow root');
assert_array_equals(log[11], [shadow.upperShadow.host, shadow.lowerShadow.host], 'EventPath[11] must be the host');
}, 'Firing an event on a node with two ancestors with a detached ' + outerUpperMode + ' and ' + outerLowerMode
+ ' shadow trees with an inner ' + innerMode + ' shadow tree');
}
testEventInsideNestedShadowsUnderAnotherShadow('open', 'open', 'open');
testEventInsideNestedShadowsUnderAnotherShadow('open', 'open', 'closed');
testEventInsideNestedShadowsUnderAnotherShadow('open', 'closed', 'open');
testEventInsideNestedShadowsUnderAnotherShadow('open', 'closed', 'closed');
testEventInsideNestedShadowsUnderAnotherShadow('closed', 'open', 'open');
testEventInsideNestedShadowsUnderAnotherShadow('closed', 'open', 'closed');
testEventInsideNestedShadowsUnderAnotherShadow('closed', 'closed', 'open');
testEventInsideNestedShadowsUnderAnotherShadow('closed', 'closed', 'closed');
</script>
</body>
</html>