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

Side by Side Diff: LayoutTests/fast/dom/shadow/event-path-for-user-agent-shadow-tree.html

Issue 14864018: Add a test for event.path() used with a user agent shadow tree. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix a typo. 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-for-user-agent-shadow-tree-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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../js/resources/js-test-pre.js"></script>
5 <script src="resources/shadow-dom.js"></script>
6 </head>
7 <body>
8 <p id="description"></p>
9 <div id="sandbox">
10 <details id="details">
11 <div id="details-child"></div>
12 <summary id="summary">
13 <div id="summary-child"></div>
14 </summary>
15 </details>
16 </div>
17 <pre id="console"></pre>
18 <script>
19 ['sandbox', 'details', 'details-child', 'summary', 'summary-child'].forEach(func tion(path) {
20 getNodeInShadowTreeStack(path).addEventListener('click', function(event) {
21 debug('\nevent.path() on node ' + dumpNode(event.currentTarget));
22 debug(dumpNodeList(event.path()));
23 });
24 });
25 var clickEvent = document.createEvent("MouseEvents");
26 clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, fa lse, false, false, 0, null);
27
28 debug("\nDispaching a click event on #details-child");
29 document.getElementById('details-child').dispatchEvent(clickEvent);
30
31 debug("\nDispaching a click event on #summary-child");
32 document.getElementById('summary-child').dispatchEvent(clickEvent);
33 </script>
34 <script src="../../js/resources/js-test-post.js"></script>
35 </body>
36 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/event-path-for-user-agent-shadow-tree-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698