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

Side by Side Diff: LayoutTests/fast/dom/shadow/event-path-with-dom-mutation.html

Issue 15063004: Make Event.path() return a pre-calculated NodeList rather than calculating it dynamically. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add an include. Created 7 years, 7 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/event-path-with-dom-mutation-expected.txt » ('j') | 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 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../js/resources/js-test-pre.js"></script> 4 <script src="../../js/resources/js-test-pre.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>
(...skipping 16 matching lines...) Expand all
27 createShadow Root({'id': 'K'}, 27 createShadow Root({'id': 'K'},
28 createDOM('div', {'id': 'L'}, 28 createDOM('div', {'id': 'L'},
29 createDOM('content', {'id': 'M'}))))))))); 29 createDOM('content', {'id': 'M'})))))))));
30 30
31 ['A', 'B', 'C', 'A/', 'A/E', 'A/F', 'A/E/', 'A/E/H', 'A/E/I', 'A/E/J', 'A/E/H/', 'A/E/H/L', 'A/E/H/M'].forEach(function(path) { 31 ['A', 'B', 'C', 'A/', 'A/E', 'A/F', 'A/E/', 'A/E/H', 'A/E/I', 'A/E/J', 'A/E/H/', 'A/E/H/L', 'A/E/H/M'].forEach(function(path) {
32 getNodeInShadowTreeStack(path).addEventListener('click', function(event) { 32 getNodeInShadowTreeStack(path).addEventListener('click', function(event) {
33 debug('\nevent.path() on node ' + dumpNode(event.currentTarget)); 33 debug('\nevent.path() on node ' + dumpNode(event.currentTarget));
34 debug(dumpNodeList(event.path())); 34 debug(dumpNodeList(event.path()));
35 }); 35 });
36 }); 36 });
37 ['B', 'A/E/I'].forEach(function(path) {
38 getNodeInShadowTreeStack(path).addEventListener('click', function(event) {
39 debug('\nRemoving node ' + dumpNode(event.currentTarget.firstChild));
40 event.currentTarget.removeChild(event.currentTarget.firstChild);
41 });
42 });
43
37 var clickEvent = document.createEvent("MouseEvents"); 44 var clickEvent = document.createEvent("MouseEvents");
38 clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, fa lse, false, false, 0, null); 45 clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, fa lse, false, false, 0, null);
39 document.getElementById('C').dispatchEvent(clickEvent); 46 document.getElementById('C').dispatchEvent(clickEvent);
40 </script> 47 </script>
41 <script src="../../js/resources/js-test-post.js"></script> 48 <script src="../../js/resources/js-test-post.js"></script>
42 </body> 49 </body>
43 </html> 50 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/event-path-with-dom-mutation-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698