Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Unified Diff: third_party/WebKit/LayoutTests/shadow-dom/v0/event-composed-path.html

Issue 2051373002: Rewrite and organize tests in LayoutTests/shadow-dom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clean-test2-3
Patch Set: clean up Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698