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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/shadow/event-path-multiple-shadow-roots-2.html

Issue 1684533002: Rename "tree of trees" to "composed tree". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script src="resources/shadow-dom.js"></script> 5 <script src="resources/shadow-dom.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <div id="sandbox"></div> 8 <div id="sandbox"></div>
9 <script> 9 <script>
10 var sandbox = document.getElementById('sandbox'); 10 var sandbox = document.getElementById('sandbox');
11 11
12 function click(path) { 12 function click(path) {
13 debug(''); 13 debug('');
14 debug('click #' + path); 14 debug('click #' + path);
15 var clickEvent = document.createEvent("MouseEvents"); 15 var clickEvent = document.createEvent("MouseEvents");
16 clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false , false, false, false, 0, null); 16 clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false , false, false, false, 0, null);
17 getNodeInTreeOfTrees(path).dispatchEvent(clickEvent); 17 getNodeInComposedTree(path).dispatchEvent(clickEvent);
18 } 18 }
19 19
20 sandbox.appendChild( 20 sandbox.appendChild(
21 createDOM('div', {'id': 'A'}, 21 createDOM('div', {'id': 'A'},
22 createDOM('div', {'id': 'B'}), 22 createDOM('div', {'id': 'B'}),
23 createShadowRoot({'id': 'SR-OLDEST'}, 23 createShadowRoot({'id': 'SR-OLDEST'},
24 createDOM('div', {'id': 'E'})), 24 createDOM('div', {'id': 'E'})),
25 createShadowRoot({'id': 'SR-MIDDLE'}, 25 createShadowRoot({'id': 'SR-MIDDLE'},
26 createDOM('content', {'id': 'H'}), 26 createDOM('content', {'id': 'H'}),
27 createDOM('div', {'id': 'I'})), 27 createDOM('div', {'id': 'I'})),
28 createShadowRoot({'id': 'SR-YOUNGEST'}, 28 createShadowRoot({'id': 'SR-YOUNGEST'},
29 createDOM('shadow', {'id': 'F'}), 29 createDOM('shadow', {'id': 'F'}),
30 createDOM('div', {'id': 'G'})))); 30 createDOM('div', {'id': 'G'}))));
31 31
32 ['A', 'B', 'A/', 'A/E', 'A//', 'A//H', 'A//I', 'A///', 'A///F', 'A///G'].forEach (function(path) { 32 ['A', 'B', 'A/', 'A/E', 'A//', 'A//H', 'A//I', 'A///', 'A///F', 'A///G'].forEach (function(path) {
33 getNodeInTreeOfTrees(path).addEventListener('click', function(event) { 33 getNodeInComposedTree(path).addEventListener('click', function(event) {
34 debug('\nevent.path on node ' + dumpNode(event.currentTarget) + ' (targe t: ' + dumpNode(event.target) + ')'); 34 debug('\nevent.path on node ' + dumpNode(event.currentTarget) + ' (targe t: ' + dumpNode(event.target) + ')');
35 debug(dumpNodeList(event.path)); 35 debug(dumpNodeList(event.path));
36 }); 36 });
37 }); 37 });
38 38
39 39
40 click('B'); 40 click('B');
41 click('A/E'); 41 click('A/E');
42 click('A//I'); 42 click('A//I');
43 click('A///G'); 43 click('A///G');
44 </script> 44 </script>
45 </body> 45 </body>
46 </html> 46 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698