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

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

Issue 473833002: Don't emptify event.path after dispatching an event. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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-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="../../../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 <div id='a'> 11 <div id='a'>
12 <div id='b'> 12 <div id='b'>
13 <div id='c'> 13 <div id='c'>
14 </div> 14 </div>
15 </div> 15 </div>
16 </div> 16 </div>
17 <script> 17 <script>
18 var b = document.getElementById('b'); 18 var b = document.getElementById('b');
19 b.addEventListener('click', function(event) { 19 b.addEventListener('click', function(event) {
20 var path = event.path; 20 var path = event.path;
21 debug(dumpNodeList(path)); 21 debug(dumpNodeList(path));
22 debug('Makes sure that event.path returns static NodeList.'); 22 debug('Makes sure that event.path returns static NodeList.');
23 path[1] = ''; 23 path[1] = '';
24 debug(dumpNodeList(event.path)); 24 debug(dumpNodeList(event.path));
25 }); 25 });
26 var clickEvent = document.createEvent("MouseEvents"); 26 var clickEvent = document.createEvent("MouseEvents");
27 debug("Makes sure that event.path is empty before dispatching the event.");
28 debug(dumpNodeList(clickEvent.path));
27 clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, fa lse, false, false, 0, null); 29 clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, fa lse, false, false, 0, null);
28 b.dispatchEvent(clickEvent); 30 b.dispatchEvent(clickEvent);
31 debug("Makes sure that event.path isn't emptified after dispatching the event.") ;
32 debug(dumpNodeList(clickEvent.path));
29 </script> 33 </script>
30 </body> 34 </body>
31 </html> 35 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/event-path-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698