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

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

Issue 253823002: Compute and use BiDi information in SVGTextMetricsBuilder (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: TestExpectations. Created 6 years, 8 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 | « LayoutTests/TestExpectations ('k') | LayoutTests/svg/text/bidi-getcomputedtextlength-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/text/bidi-getcomputedtextlength.html
diff --git a/LayoutTests/svg/text/bidi-getcomputedtextlength.html b/LayoutTests/svg/text/bidi-getcomputedtextlength.html
new file mode 100644
index 0000000000000000000000000000000000000000..e9fd5a9dba2a0c3faeb5eff54bbc3ad6df4ae96e
--- /dev/null
+++ b/LayoutTests/svg/text/bidi-getcomputedtextlength.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<title>getComputedTextLength() with arabic script</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<svg width="50px" height="60px" font-family="Arial" font-size="30px">
+ <text id="ltrtext" y="30">إعلانات</text>
+ <text id="rtltext" y="60" direction="rtl">إعلانات</text>
+ <text id="ltrspace"><tspan>نه</tspan> با</text>
+ <text id="rtlspace" direction="rtl"><tspan>نه</tspan> با</text>
+</svg>
+<script>
+test(function() {
+ var textElementLtr = document.getElementById("ltrtext");
+ var textElementRtl = document.getElementById("rtltext");
+
+ var widthLtr = textElementLtr.getComputedTextLength();
+ var widthRtl = textElementRtl.getComputedTextLength();
+
+ assert_equals(widthLtr, widthRtl);
+}, 'Direction does not affect computed text length.');
+
+test(function() {
+ var textElementLtr = document.getElementById("ltrspace");
+ var textElementRtl = document.getElementById("rtlspace");
+
+ var widthLtr = textElementLtr.getComputedTextLength();
+ var widthRtl = textElementRtl.getComputedTextLength();
+
+ assert_equals(widthLtr, widthRtl);
+}, 'Direction does not affect computed text length - whitespace.');
+</script>
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/svg/text/bidi-getcomputedtextlength-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698