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

Side by Side Diff: third_party/WebKit/LayoutTests/shadow-dom/event-path-related-target-scoped.html

Issue 2036933002: Do not use a non-standard label attribute in shadow-dom.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 label=host> 5 <div id=host>
6 <template label=shadowRoot data-mode=open> 6 <template id=shadowRoot data-mode=open>
7 <input label="input1"></input> 7 <input id=input1></input>
8 <input label="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', 'input2', expectedPath],
19 ['shadowRoot', 'input2', expectedPath]]); 19 ['shadowRoot', '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