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

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

Issue 2056213002: Add tests for retargeted event.target in LayoutTests/shadow-dom/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@events-1
Patch Set: rebased 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/shadow-dom/resources/shadow-dom.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="../resources/shadow-dom.js"></script> 4 <script src="../resources/shadow-dom.js"></script>
5 <div id="test1"> 5 <div id="test1">
6 <input id="input" slot="slot"> 6 <input id="input" slot="slot">
7 <template id="shadowroot-v1" data-mode="open"> 7 <template id="shadowroot-v1" data-mode="open">
8 <div id="host"> 8 <div id="host">
9 <div id="slot-parent"> 9 <div id="slot-parent">
10 <slot id="slot" name="slot"></slot> 10 <slot id="slot" name="slot"></slot>
11 </div> 11 </div>
12 <template id="shadowroot-v0" data-mode="v0"> 12 <template id="shadowroot-v0" data-mode="v0">
13 <content id="content" select="#slot-parent"></content> 13 <content id="content" select="#slot-parent"></content>
14 </template> 14 </template>
15 </div> 15 </div>
16 </template> 16 </template>
17 </div> 17 </div>
18 <script> 18 <script>
19 test(() => { 19 test(() => {
20 let n = createTestTree(test1); 20 let n = createTestTree(test1);
21 removeWhiteSpaceOnlyTextNodes(n.test1); 21 removeWhiteSpaceOnlyTextNodes(n.test1);
22 let log = dispatchEventWithLog(n, n.input, new Event('my-event', { bubbles: tr ue, compsoed: true })); 22 let log = dispatchEventWithLog(n, n.input, new Event('my-event', { bubbles: tr ue, compsoed: true }));
23 let path = ['input', 'slot', 'slot-parent', 'content', 'shadowroot-v0', 'host' ,
24 'shadowroot-v1', 'test1'];
23 assert_event_path_equals(log, 25 assert_event_path_equals(log,
24 makeExpectedEventPathLog( 26 [['input', 'input', null, path],
25 ['input', 'slot', 'slot-parent', 'content', 'shadow root-v0', 'host', 27 ['slot', 'input', null, path],
26 'shadowroot-v1', 'test1'])); 28 ['slot-parent', 'input', null, path],
29 ['content', 'input', null, path],
30 ['shadowroot-v0', 'input', null, path],
31 ['host', 'input', null, path],
32 ['shadowroot-v1', 'input', null, path],
33 ['test1', 'input', null, path]]);
27 }, 'EventPath works fine with v0 insertion points & v1 slots.'); 34 }, 'EventPath works fine with v0 insertion points & v1 slots.');
28 </script> 35 </script>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/shadow-dom/resources/shadow-dom.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698