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> |