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

Side by Side 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, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <meta charset="UTF-8">
3 <title>getComputedTextLength() with arabic script</title>
4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script>
6 <svg width="50px" height="60px" font-family="Arial" font-size="30px">
7 <text id="ltrtext" y="30">إعلانات</text>
8 <text id="rtltext" y="60" direction="rtl">إعلانات</text>
9 <text id="ltrspace"><tspan>نه</tspan> با</text>
10 <text id="rtlspace" direction="rtl"><tspan>نه</tspan> با</text>
11 </svg>
12 <script>
13 test(function() {
14 var textElementLtr = document.getElementById("ltrtext");
15 var textElementRtl = document.getElementById("rtltext");
16
17 var widthLtr = textElementLtr.getComputedTextLength();
18 var widthRtl = textElementRtl.getComputedTextLength();
19
20 assert_equals(widthLtr, widthRtl);
21 }, 'Direction does not affect computed text length.');
22
23 test(function() {
24 var textElementLtr = document.getElementById("ltrspace");
25 var textElementRtl = document.getElementById("rtlspace");
26
27 var widthLtr = textElementLtr.getComputedTextLength();
28 var widthRtl = textElementRtl.getComputedTextLength();
29
30 assert_equals(widthLtr, widthRtl);
31 }, 'Direction does not affect computed text length - whitespace.');
32 </script>
OLDNEW
« 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