Open
Bug 570378
Opened 15 years ago
Updated 2 years ago
Add tests for numeric substitution (e.g. in Arabic) in text not in text frames
Categories
(Core :: Layout: Text and Fonts, defect)
Core
Layout: Text and Fonts
Tracking
()
NEW
mozilla1.9.3a5
People
(Reporter: smontagu, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
It would be good to have tests for Arabic/Indic/Persian numeric substitution that test the RenderText and ProcessText code paths in nsBidiPresUtils.cpp. RenderText is used by XUL text, image ALT text, print headers and footers; and ProcessText is used by canvas text-drawing methods.
Comment 1•15 years ago
|
||
I think testing them in img alt tags is enough (don't know how to trigger print preview headers and footers in mochitests anyway!).
Note to self: the tests here need to land on 1.9.1 and 1.9.2 as well.
Comment 2•15 years ago
|
||
This patch adds the exact same logic that we have in bidi.numeral tests for text inside textframes to image alt tests, which are not rendered using text frames.
Attachment #449507 -
Flags: review?(roc)
Attachment #449507 -
Flags: review?(roc) → review+
Reporter | ||
Comment 3•15 years ago
|
||
There's a problem here... the tests are all passing for me locally, but when I check them manually I can see bugs. For example, with bidi.numeral=1 or 2, bug570378-arabic-2.html and bug570378-arabic-2-ref.html both display the numbers as 123, so the test passes, but they should both be displaying ١٢٣.
Is there any way that we can load the test pages with the specified value of bidi.numeral and reset bidi.numeral to 0 before loading the reference page (which of course would mean changing some of the "expected" results here and in the existing tests has well)? I think that that would make the tests more robust, because then the reference rendering wouldn't be affected by bugs in numeral substitution.
Comment 4•15 years ago
|
||
Oh, I pushed this without seeing comment 3...
http://hg.mozilla.org/mozilla-central/rev/0e1c7c4f51cd
Flags: in-testsuite+
Target Milestone: --- → mozilla1.9.3a5
Comment 5•15 years ago
|
||
(In reply to comment #3)
> There's a problem here... the tests are all passing for me locally, but when I
> check them manually I can see bugs. For example, with bidi.numeral=1 or 2,
> bug570378-arabic-2.html and bug570378-arabic-2-ref.html both display the
> numbers as 123, so the test passes, but they should both be displaying ١٢٣.
Hmm, maybe I'm missing something, but why do you think that should happen?
> Is there any way that we can load the test pages with the specified value of
> bidi.numeral and reset bidi.numeral to 0 before loading the reference page
> (which of course would mean changing some of the "expected" results here and in
> the existing tests has well)? I think that that would make the tests more
> robust, because then the reference rendering wouldn't be affected by bugs in
> numeral substitution.
That's a test strategy which I think might be worthwhile to experiment with. It's kind of a pain though because I need to edit a few thousand test files! ;-) I'll work on it in you file the bug. :-)
Not marking this as FIXED pending your answer to my earlier question.
Reporter | ||
Comment 6•15 years ago
|
||
(In reply to comment #5)
> (In reply to comment #3)
> > with bidi.numeral=1 or 2,
> > bug570378-arabic-2.html and bug570378-arabic-2-ref.html both display the
> > numbers as 123, so the test passes, but they should both be displaying ١٢٣.
>
> Hmm, maybe I'm missing something, but why do you think that should happen?
1 and 2 for bidi.numeral mean contextual numeric substitution, so the numerals after Arabic text should become Hindi numerals, no? It's also what happens with bug441782-2.html.
Updated•5 years ago
|
Assignee: ehsan → nobody
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•