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

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

Issue 137993003: Revert the feature of the <shadow> element as 'a function call' to the previous behavior. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update LayoutTests/TestExpectations Created 6 years, 11 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 | Annotate | Revision Log
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 <p id="description"></p> 8 <p id="description"></p>
9 <div id="sandbox"></div> 9 <div id="sandbox"></div>
10 <pre id="console"></pre> 10 <pre id="console"></pre>
11 <script> 11 <script>
12 var sandbox = document.getElementById('sandbox'); 12 var sandbox = document.getElementById('sandbox');
13 13
14 sandbox.appendChild( 14 sandbox.appendChild(
15 createDOM('div', {'id': 'A'}, 15 createDOM('div', {'id': 'A'},
16 createDOM('div', {'id': 'B'}, 16 createDOM('div', {'id': 'B'},
17 createDOM('div', {'id': 'C'})), 17 createDOM('div', {'id': 'C'})),
18 createShadowRoot({'id': 'D'}, 18 createShadowRoot({'id': 'D'},
19 createDOM('div', {'id': 'E'}, 19 createDOM('div', {'id': 'E'},
20 createDOM('content', {'id': 'F'}))), 20 createDOM('content', {'id': 'F'}))),
21 createShadowRoot({'id': 'G'}, 21 createShadowRoot({'id': 'G'},
22 createDOM('div', {'id': 'H'}, 22 createDOM('div', {'id': 'H'},
23 createDOM('shadow', {'id': 'I'}, 23 createDOM('shadow', {'id': 'I'})))));
24 createDOM('content', {'id': ' J'}))))));
25 24
26 ['A', 'B', 'C', 'A/', 'A/E', 'A/F', 'A//', 'A//H', 'A//I', 'A//J'].forEach(funct ion(path) { 25 ['A', 'B', 'C', 'A/', 'A/E', 'A/F', 'A//', 'A//H', 'A//I'].forEach(function(path ) {
27 getNodeInTreeOfTrees(path).addEventListener('click', function(event) { 26 getNodeInTreeOfTrees(path).addEventListener('click', function(event) {
28 debug('\nevent.path on node ' + dumpNode(event.currentTarget)); 27 debug('\nevent.path on node ' + dumpNode(event.currentTarget));
29 debug(dumpNodeList(event.path)); 28 debug(dumpNodeList(event.path));
30 }); 29 });
31 }); 30 });
32 var clickEvent = document.createEvent("MouseEvents"); 31 var clickEvent = document.createEvent("MouseEvents");
33 clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, fa lse, false, false, 0, null); 32 clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, fa lse, false, false, 0, null);
34 document.getElementById('C').dispatchEvent(clickEvent); 33 document.getElementById('C').dispatchEvent(clickEvent);
35 </script> 34 </script>
36 </body> 35 </body>
37 </html> 36 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698