blob: c2c619bf816f79ba0e8b299f37b340ef6a3ccd1b [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../resources/shadow-dom.js"></script>
<div id="test1">
<input id="input" slot="slot">
<template id="shadowroot-v1" data-mode="open">
<div id="host">
<div id="slot-parent">
<slot id="slot" name="slot"></slot>
</div>
<template id="shadowroot-v0" data-mode="v0">
<content id="content" select="#slot-parent"></content>
</template>
</div>
</template>
</div>
<script>
test(() => {
let n = createTestTree(test1);
removeWhiteSpaceOnlyTextNodes(n.test1);
let log = dispatchEventWithLog(n, n.input, new Event('my-event', { bubbles: true, compsoed: true }));
let path = ['input', 'slot', 'slot-parent', 'content', 'shadowroot-v0', 'host',
'shadowroot-v1', 'test1'];
assert_event_path_equals(log,
[['input', 'input', null, path],
['slot', 'input', null, path],
['slot-parent', 'input', null, path],
['content', 'input', null, path],
['shadowroot-v0', 'input', null, path],
['host', 'input', null, path],
['shadowroot-v1', 'input', null, path],
['test1', 'input', null, path]]);
}, 'EventPath works fine with v0 insertion points & v1 slots.');
</script>