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

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

Issue 1083073002: Add a "logical query mode" to SVGTextQuery (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Older URL. Created 5 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
Index: LayoutTests/svg/text/bidi-getsubstringlength.html
diff --git a/LayoutTests/svg/text/bidi-getsubstringlength.html b/LayoutTests/svg/text/bidi-getsubstringlength.html
index 5a9f39c3f33dcfa8ea9c36efa515558b3b89e678..3934e89305f8c46acf9615b697656e67114585a7 100644
--- a/LayoutTests/svg/text/bidi-getsubstringlength.html
+++ b/LayoutTests/svg/text/bidi-getsubstringlength.html
@@ -5,11 +5,13 @@
<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>
+ <text id="rtltext" y="60" x="75" direction="rtl">إعلانات</text>
+ <text id="ltrmixed" y="90">Fooإعلانات</text>
+ <text id="rtlmixed" y="120" x="75" direction="rtl">Fooإعلانات</text>
</svg>
<script>
test(function() {
- var textElms = document.querySelectorAll('text');
+ var textElms = document.getElementsByTagName('text');
var ltr = textElms[0];
var rtl = textElms[1];
var subExtentsLtr = [];
@@ -21,4 +23,12 @@ test(function() {
assert_array_equals(subExtentsLtr, subExtentsRtl);
}, '"direction" does not affect sub string lengths.');
+
+test(function() {
+ var textElms = document.getElementsByTagName('text');
+ var extentsLtr = textElms[2].getSubStringLength(2, 7);
+ var extentsRtl = textElms[3].getSubStringLength(2, 7);
+
+ assert_equals(extentsLtr, extentsRtl);
+}, '"direction" does not affect sub string lengths across BiDi runs w/ different levels.');
</script>
« no previous file with comments | « LayoutTests/svg/text/bidi-getcharnumatpos-expected.txt ('k') | LayoutTests/svg/text/bidi-getsubstringlength-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698