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

Side by Side Diff: third_party/WebKit/LayoutTests/shadow-dom/event-path-related-target-scoped.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
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=host> 5 <div id=host>
6 <template id=shadowRoot data-mode=open> 6 <template id=shadowRoot data-mode=open>
7 <input id=input1></input> 7 <input id=input1></input>
8 <input id=input2></input> 8 <input id=input2></input>
9 </template> 9 </template>
10 </div> 10 </div>
11 <script> 11 <script>
12 test(() => { 12 test(() => {
13 let nodes = createTestTree(host); 13 let nodes = createTestTree(host);
14 let log = dispatchEventWithLog(nodes, nodes['input1'], 14 let log = dispatchEventWithLog(nodes, nodes['input1'],
15 new FocusEvent('test', { bubbles: true, related Target: nodes['input2']})); 15 new FocusEvent('test', { bubbles: true, related Target: nodes['input2']}));
16 let expectedPath = ['input1', 'shadowRoot']; 16 let expectedPath = ['input1', 'shadowRoot'];
17 assert_event_path_equals(log, 17 assert_event_path_equals(log,
18 [['input1', 'input2', expectedPath], 18 [['input1', 'input1', 'input2', expectedPath],
19 ['shadowRoot', 'input2', expectedPath]]); 19 ['shadowRoot', 'input1', 'input2', expectedPath]]);
20 }, 'An event should stop at the common ancestor of target and relatedTarget.'); 20 }, 'An event should stop at the common ancestor of target and relatedTarget.');
21 </script> 21 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698