Index: third_party/WebKit/LayoutTests/shadow-dom/v0/event-composed-path.html |
diff --git a/third_party/WebKit/LayoutTests/shadow-dom/v0/event-composed-path.html b/third_party/WebKit/LayoutTests/shadow-dom/v0/event-composed-path.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..328e5d58a5ead5688045b23170af4baed532a6d5 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/shadow-dom/v0/event-composed-path.html |
@@ -0,0 +1,28 @@ |
+<!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 })); |
+ assert_event_path_equals(log, |
+ makeExpectedEventPathLog( |
+ ['input', 'slot', 'slot-parent', 'content', 'shadowroot-v0', 'host', |
+ 'shadowroot-v1', 'test1'])); |
+}, 'EventPath works fine with v0 insertion points & v1 slots.'); |
+</script> |