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

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

Issue 14508005: Support an Event Path API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Introduce TreeScope::isInclusiveAncestorOf 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/event-path-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/shadow/event-path.html
diff --git a/LayoutTests/fast/dom/shadow/event-path.html b/LayoutTests/fast/dom/shadow/event-path.html
new file mode 100644
index 0000000000000000000000000000000000000000..b8ff94535e6cf7dbbe7fad766c8cf681b0b5b763
--- /dev/null
+++ b/LayoutTests/fast/dom/shadow/event-path.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../js/resources/js-test-pre.js"></script>
+<script src="resources/shadow-dom.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="sandbox"></div>
+<pre id="console"></pre>
+<div id='a'>
+ <div id='b'>
+ <div id='c'>
+ </div>
+ </div>
+</div>
+<script>
+var b = document.getElementById('b');
+b.addEventListener('click', function(event) {
+ var path = event.path();
+ debug(dumpNodeList(path));
+ debug('Makes sure that event.path() returns static NodeList.');
+ path[1] = '';
+ debug(dumpNodeList(event.path()));
+});
+var clickEvent = document.createEvent("MouseEvents");
+clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
+b.dispatchEvent(clickEvent);
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
« 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