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

Unified Diff: third_party/WebKit/LayoutTests/svg/hittest/text-multiple-dx-values.svg

Issue 1454623002: Hit test SVG line boxes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add forgotten test. Sorry, test! Created 5 years, 1 month 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
Index: third_party/WebKit/LayoutTests/svg/hittest/text-multiple-dx-values.svg
diff --git a/third_party/WebKit/LayoutTests/svg/hittest/text-multiple-dx-values.svg b/third_party/WebKit/LayoutTests/svg/hittest/text-multiple-dx-values.svg
new file mode 100644
index 0000000000000000000000000000000000000000..7518e471891c117ce4520f7f7d913f398af48beb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/hittest/text-multiple-dx-values.svg
@@ -0,0 +1,31 @@
+<svg onload="runTest()" width="500" height="150" viewBox="0 0 1000 300" xmlns="http://www.w3.org/2000/svg">
+ <script src="../../resources/ahem.js"></script>
+ <rect id="background" width="100%" height="100%" fill="blue" />
+ <text id="text" x="10" y="1em" dx="0 50 100">Foo</text>
+ <defs>
+ <style type="text/css">
+ <![CDATA[
+ text {
+ font-family: Ahem;
+ font-size: 40px;
+ }
+ ]]>
+ </style>
+ <script type="text/javascript">
+ <![CDATA[
+ function runTest() {
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ // (15,15) is within a glyph cell of #text, (35,15) is not.
+ var text = document.getElementById("text");
+ var background = document.getElementById("background");
+ if (document.elementFromPoint(15, 15) === text && document.elementFromPoint(35, 15) === background)
+ text.textContent = "PASS";
+ else
+ text.textContent = "FAIL";
+ }
+ ]]>
+ </script>
+ </defs>
+</svg>

Powered by Google App Engine
This is Rietveld 408576698