Closed
Bug 610568
Opened 15 years ago
Closed 14 years ago
mochitest with extra whitespaces for nsIAccessibleText
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: fherrera, Assigned: fherrera)
References
Details
Attachments
(1 file, 4 obsolete files)
|
33.02 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.28 Safari/534.10
Build Identifier:
Add tests with extra whitespaces and punctuation signs for nsIAccessibleText getText functions.
Reproducible: Always
| Assignee | ||
Comment 1•15 years ago
|
||
Initial bunch of tests. Still need to add tests for divs where the string is collapsed
Attachment #489075 -
Flags: review?(surkov.alexander)
Updated•15 years ago
|
Assignee: nobody → fherrera
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment 2•15 years ago
|
||
(In reply to comment #1)
> Initial bunch of tests. Still need to add tests for divs where the string is
> collapsed
use pre tag
Comment 3•15 years ago
|
||
perhaps you will hate me but can we get smaller test string?
// __B__r__a__v__e__ __ __S__i__r__ __ __ __R__o__b__i__n__ __ __ __ __ __ __r__a__n__ __ __a__w__a__y__.__.__.__ __b__r__a__v__e__l__y__
24
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
or could you describe what kind of special test it allows us?
| Assignee | ||
Comment 4•14 years ago
|
||
Well, I wanted to test different amounts of whitespaces (2,3,5,2,1) and also the usage of "..." extra characters.
| Assignee | ||
Comment 5•14 years ago
|
||
Updated patch extending test to div and editable elements inside a <pre>
Attachment #489075 -
Attachment is obsolete: true
Attachment #489075 -
Flags: review?(surkov.alexander)
Comment 6•14 years ago
|
||
(In reply to comment #4)
> Well, I wanted to test different amounts of whitespaces (2,3,5,2,1) and also
> the usage of "..." extra characters.
Ok I agree it might make sense to test 1, 2, 3. But what's about 5, why it is special?
Comment 7•14 years ago
|
||
Btw, does ATK spec have definition of 'word' term? I wonder about 'away...' where's the word here.
Comment 8•14 years ago
|
||
and btw why do you need to test '...' boundaries here? In general I would like to see small test string as possible.
| Assignee | ||
Comment 9•14 years ago
|
||
ok, so let keep this one just for single vs. multiple whitespaces and I'll add another one testing words.
So, what about using this string:
__B__r__a__v__e__ __S__i__r__ __ __R__o__b__i__n__ __ __ __r__a__n
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| Assignee | ||
Comment 10•14 years ago
|
||
Should we also skip line boundaries testing here or is there any reason to keep them?
Comment 11•14 years ago
|
||
(In reply to comment #9)
> ok, so let keep this one just for single vs. multiple whitespaces and I'll add
> another one testing words.
>
> So, what about using this string:
> __B__r__a__v__e__ __S__i__r__ __ __R__o__b__i__n__ __ __ __r__a__n
> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
sounds good till it fits to 80 lines restriction ;)
(In reply to comment #10)
> Should we also skip line boundaries testing here or is there any reason to keep
> them?
I think we could skip'em. I don't see any peculiarities they could bring.
| Assignee | ||
Comment 12•14 years ago
|
||
Updated patch with new test string
Attachment #490062 -
Attachment is obsolete: true
Attachment #491599 -
Flags: review?(surkov.alexander)
Comment 13•14 years ago
|
||
Comment on attachment 491599 [details] [diff] [review]
patch3
>+ <title>nsIAccessibleText getText related function tests with whitespaces for html:input,html:div and html:textarea</title>
perhaps something like that?
getText... methods tests on string with whitespaces for plain text containers
>+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
put @href on new line please
>+ <script type="application/javascript"
>+ src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
>+ <script type="application/javascript"
>+ src="../common.js"></script>
add new line between standard js and a11y js.
>+ function doTest()
>+ {
>+ // Tests for elements rendering the original sring
>+ var IDs = ["input", "div", "editable", "textarea"];
>+
>+
>+ // __B__r__a__v__e__ __S__i__r__ __ __R__o__b__i__n__ __ __ __r__a__n
remove one empty line
>+ // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
>+ ////////////////////////////////////////////////////////////////////////
but please add new one between these
please put char index before char like we do in test_single.html so that index points to the char visually
;
>+ testTextAfterOffset(9, BOUNDARY_WORD_START, "Sir ", 7, 13,
>+ testTextAfterOffset(10, BOUNDARY_WORD_START, "Sir ", 7, 13,
should be Robin
>+ testTextAfterOffset(21, BOUNDARY_WORD_END, "", 22, 22,
please add test for 22 as well
>+ testTextBeforeOffset(21, BOUNDARY_WORD_START, "Robin ", 11, 19,
please add test for 22 as well
>+ testTextBeforeOffset(22, BOUNDARY_WORD_END, " ran", 16, 22,
should be " Robin" because "... to the word end before the offset", word end before the 22 offset is "Robin" since 22 is end offset of "run".
>+ testTextAtOffset(21, BOUNDARY_WORD_START, "ran", 19, 22,
please add test for 22 as well
>+ testTextAtOffset(21, BOUNDARY_WORD_END, " ran", 16, 22,
please add test for 22 as well
Attachment #491599 -
Flags: review?(surkov.alexander)
| Assignee | ||
Comment 14•14 years ago
|
||
Updated patch
Attachment #491599 -
Attachment is obsolete: true
Attachment #491831 -
Flags: review?(surkov.alexander)
Comment 15•14 years ago
|
||
Comment on attachment 491831 [details] [diff] [review]
patch4
r=me, thank you
Attachment #491831 -
Flags: review?(surkov.alexander) → review+
| Assignee | ||
Comment 16•14 years ago
|
||
Just forgot to update kOk/kTodo status for new tests.
Attachment #491831 -
Attachment is obsolete: true
Comment 17•14 years ago
|
||
landed on 2.0 - http://hg.mozilla.org/mozilla-central/rev/b89d1824a762
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•