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

Unified Diff: LayoutTests/svg/text/getcharnumatposition-multiple-fragments.html

Issue 349573005: Handle multiple fragments in the getCharNumberAtPosition SVGTextQuery (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove redundant line from test. 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/text/getcharnumatposition-multiple-fragments-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/text/getcharnumatposition-multiple-fragments.html
diff --git a/LayoutTests/svg/text/getcharnumatposition-multiple-fragments.html b/LayoutTests/svg/text/getcharnumatposition-multiple-fragments.html
new file mode 100644
index 0000000000000000000000000000000000000000..6af2bfcad8018ca5ad26267082e3984a36e5646e
--- /dev/null
+++ b/LayoutTests/svg/text/getcharnumatposition-multiple-fragments.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<svg height="0">
+ <defs><path id="p" d="M0,20h100"/></defs>
+ <text y="20" font-size="20" font-family="Ahem"><textPath xlink:href="#p">AAAA</textPath></text>
+</svg>
+<script>
+test(function() {
+ var text = document.querySelector('text');
+ var extents = text.getExtentOfChar(0);
+ var point = document.querySelector('svg').createSVGPoint();
+ point.x = extents.width / 2;
+ point.y = 10;
+ for (var i = 0; i < 4; ++i) {
+ assert_equals(text.getCharNumAtPosition(point), i);
+
+ point.x += extents.width;
+ }
+}, 'SVGTextContentElement.getCharNumAtPosition w/ multiple fragments per text box.');
+</script>
« no previous file with comments | « no previous file | LayoutTests/svg/text/getcharnumatposition-multiple-fragments-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698