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

Unified Diff: LayoutTests/svg/text/bidi-getsubstringlength.html

Issue 1032363002: Fix handling of Arabic script in SVGTextContentElement.getSubStringLength (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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/bidi-getsubstringlength-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/text/bidi-getsubstringlength.html
diff --git a/LayoutTests/svg/text/bidi-getsubstringlength.html b/LayoutTests/svg/text/bidi-getsubstringlength.html
new file mode 100644
index 0000000000000000000000000000000000000000..5a9f39c3f33dcfa8ea9c36efa515558b3b89e678
--- /dev/null
+++ b/LayoutTests/svg/text/bidi-getsubstringlength.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<title>getSubStringLength() with Arabic script</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<svg width="50px" height="120px" font-family="Arial" font-size="30px">
+ <text id="ltrtext" y="30">إعلانات</text>
+ <text id="rtltext" y="90" x="75" direction="rtl">إعلانات</text>
+</svg>
+<script>
+test(function() {
+ var textElms = document.querySelectorAll('text');
+ var ltr = textElms[0];
+ var rtl = textElms[1];
+ var subExtentsLtr = [];
+ var subExtentsRtl = [];
+ for (var i = 1; i < 7; ++i) {
+ subExtentsLtr.push(ltr.getSubStringLength(1, i));
+ subExtentsRtl.push(rtl.getSubStringLength(1, i));
+ }
+
+ assert_array_equals(subExtentsLtr, subExtentsRtl);
+}, '"direction" does not affect sub string lengths.');
+</script>
« no previous file with comments | « no previous file | LayoutTests/svg/text/bidi-getsubstringlength-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698