Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / text / bidi-getsubstringlength.html
blob3934e89305f8c46acf9615b697656e67114585a7
1 <!DOCTYPE html>
2 <meta charset="UTF-8">
3 <title>getSubStringLength() with Arabic script</title>
4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script>
6 <svg width="50px" height="120px" font-family="Arial" font-size="30px">
7 <text id="ltrtext" y="30">إعلانات</text>
8 <text id="rtltext" y="60" x="75" direction="rtl">إعلانات</text>
9 <text id="ltrmixed" y="90">Fooإعلانات</text>
10 <text id="rtlmixed" y="120" x="75" direction="rtl">Fooإعلانات</text>
11 </svg>
12 <script>
13 test(function() {
14 var textElms = document.getElementsByTagName('text');
15 var ltr = textElms[0];
16 var rtl = textElms[1];
17 var subExtentsLtr = [];
18 var subExtentsRtl = [];
19 for (var i = 1; i < 7; ++i) {
20 subExtentsLtr.push(ltr.getSubStringLength(1, i));
21 subExtentsRtl.push(rtl.getSubStringLength(1, i));
24 assert_array_equals(subExtentsLtr, subExtentsRtl);
25 }, '"direction" does not affect sub string lengths.');
27 test(function() {
28 var textElms = document.getElementsByTagName('text');
29 var extentsLtr = textElms[2].getSubStringLength(2, 7);
30 var extentsRtl = textElms[3].getSubStringLength(2, 7);
32 assert_equals(extentsLtr, extentsRtl);
33 }, '"direction" does not affect sub string lengths across BiDi runs w/ different levels.');
34 </script>