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

Unified Diff: LayoutTests/svg/custom/use-event-handler-on-referenced-element-addEventListener.svg

Issue 312423002: Don't expose the user agent shadow tree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix tests before landing Created 6 years, 6 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/svg/custom/use-event-handler-on-referenced-element-addEventListener-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/custom/use-event-handler-on-referenced-element-addEventListener.svg
diff --git a/LayoutTests/svg/custom/use-event-handler-on-referenced-element-addEventListener.svg b/LayoutTests/svg/custom/use-event-handler-on-referenced-element-addEventListener.svg
new file mode 100644
index 0000000000000000000000000000000000000000..f048162760578d85aedfc9dc54c5837bb3f6057c
--- /dev/null
+++ b/LayoutTests/svg/custom/use-event-handler-on-referenced-element-addEventListener.svg
@@ -0,0 +1,44 @@
+<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 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() {
+ var rect = this;
+ 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();
+ }
+ var el = document.getElementById("referenceRect");
+ el.addEventListener("click", test, false);
+
+ var use = document.createElementNS("http://www.w3.org/2000/svg", "use");
+ use.setAttribute("fill", "grey");
+ use.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', '#reference')
+ document.documentElement.appendChild(use);
+ ]]>
+ </script>
+ </defs>
+
+ <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>
« no previous file with comments | « no previous file | LayoutTests/svg/custom/use-event-handler-on-referenced-element-addEventListener-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698