Index: LayoutTests/fast/dom/shadow/event-path-for-user-agent-shadow-tree.html |
diff --git a/LayoutTests/fast/dom/shadow/event-path-for-user-agent-shadow-tree.html b/LayoutTests/fast/dom/shadow/event-path-for-user-agent-shadow-tree.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ed8926f3645ce88f15165b469d6670be1c5d39d3 |
--- /dev/null |
+++ b/LayoutTests/fast/dom/shadow/event-path-for-user-agent-shadow-tree.html |
@@ -0,0 +1,36 @@ |
+<!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"> |
+ <details id="details"> |
+ <div id="details-child"></div> |
+ <summary id="summary"> |
+ <div id="summary-child"></div> |
+ </summary> |
+ </details> |
+</div> |
+<pre id="console"></pre> |
+<script> |
+['sandbox', 'details', 'details-child', 'summary', 'summary-child'].forEach(function(path) { |
+ getNodeInShadowTreeStack(path).addEventListener('click', function(event) { |
+ debug('\nevent.path() on node ' + dumpNode(event.currentTarget)); |
+ 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); |
+ |
+debug("\nDispaching a click event on #details-child"); |
+document.getElementById('details-child').dispatchEvent(clickEvent); |
+ |
+debug("\nDispaching a click event on #summary-child"); |
+document.getElementById('summary-child').dispatchEvent(clickEvent); |
+</script> |
+<script src="../../js/resources/js-test-post.js"></script> |
+</body> |
+</html> |