Index: LayoutTests/svg/custom/use-event-handler-on-referenced-element-hierarchy.svg |
diff --git a/LayoutTests/svg/custom/use-event-handler-on-referenced-element-hierarchy.svg b/LayoutTests/svg/custom/use-event-handler-on-referenced-element-hierarchy.svg |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d7c8e378e6e038874e74e7764238e4eaabca57da |
--- /dev/null |
+++ b/LayoutTests/svg/custom/use-event-handler-on-referenced-element-hierarchy.svg |
@@ -0,0 +1,39 @@ |
+<svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="clickRect()"> |
+ <script xlink:href="../../fast/repaint/resources/text-based-repaint.js"/> |
+ <defs id="hidden"> |
+ <g id="reference"> |
+ <rect onclick="test(evt)" id="referenceRect" x="240" y="1" width="239" height="358"/> |
+ </g> |
+ |
+ <script type="text/ecmascript"> |
+ <![CDATA[ |
+ if (window.testRunner) |
+ testRunner.dumpAsText(); |
+ |
+ function clickRect() { |
+ if (window.eventSender) { |
+ testRunner.waitUntilDone(); |
+ eventSender.mouseMoveTo(250, 50); |
+ eventSender.mouseDown(); |
+ eventSender.mouseUp(); |
+ } |
+ } |
+ |
+ function test(evt) { |
+ var rect = evt.currentTarget; |
+ var g = document.getElementById("reference"); |
+ var defs = document.getElementById("hidden"); |
+ if (rect.parentNode == g && rect.parentNode.parentNode == defs) |
+ document.getElementById("text").firstChild.nodeValue = "Test passed."; |
+ if (window.testRunner) |
+ testRunner.notifyDone(); |
+ } |
+ ]]> |
+ </script> |
+ </defs> |
+ |
+ <use xlink:href="#reference" fill="grey"/> |
+ |
+ <text id="text" transform="translate(5,20)">Test failed.</text> |
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> |
+</svg> |