1 | | layer at (0,0) size 800x600
|
---|
2 | | LayoutView at (0,0) size 800x600
|
---|
3 | | layer at (0,0) size 800x215
|
---|
4 | | LayoutBlockFlow {HTML} at (0,0) size 800x215
|
---|
5 | | LayoutBlockFlow {BODY} at (8,16) size 784x191
|
---|
6 | | LayoutBlockFlow {P} at (0,0) size 784x20
|
---|
7 | | LayoutText {#text} at (0,0) size 588x19
|
---|
8 | | text run at (0,0) width 588: "Test passes if, when the text area below is focused for editing, the text insertion caret is green."
|
---|
9 | | LayoutBlockFlow {P} at (0,36) size 784x20
|
---|
10 | | LayoutText {#text} at (0,0) size 432x19
|
---|
11 | | text run at (0,0) width 432: "The shape of the caret, and whether it flashes, are not part of the test."
|
---|
12 | | LayoutBlockFlow (anonymous) at (0,72) size 784x119
|
---|
13 | | LayoutText {#text} at (0,0) size 0x0
|
---|
14 | | layer at (8,88) size 412x114 clip at (9,89) size 410x112
|
---|
15 | | LayoutTextControl {TEXTAREA} at (0,0) size 412x114 [color=#FFFFFF] [bgcolor=#000000] [border: (1px solid #A9A9A9)]
|
---|
16 | | LayoutBlockFlow {DIV} at (11,11) size 390x46
|
---|
17 | | caret: position 0 of child 0 {DIV} of {#document-fragment} of child 5 {TEXTAREA} of body
|
---|
| 1 | Tests various scenarios for caret position when direction is auto
|
---|
| 2 |
|
---|
| 3 | On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
|
---|
| 4 |
|
---|
| 5 |
|
---|
| 6 | PASS textarea.value is "א!"
|
---|
| 7 | 1. Caret is at right if text is in LTR direction
|
---|
| 8 | PASS textarea.value is "א!\nhello"
|
---|
| 9 | Compares lines if they are different
|
---|
| 10 | PASS beforeCaretPos[1] is not afterCaretPos[1]
|
---|
| 11 | New text is in LTR direction, start of caret will differ
|
---|
| 12 | PASS beforeCaretPos[0] is > afterCaretPos[0]
|
---|
| 13 | 2. Addition of RTL text in middle of LTR text, caret moves to the left of the line.
|
---|
| 14 | PASS textarea.value is "א!\nhelloאא"
|
---|
| 15 | RTL text added will be move caret to start of position where hello begins
|
---|
| 16 | PASS beforeCaretPos[0] is afterCaretPos[0]+afterCaretPos[2]
|
---|
| 17 | 3. Adding LTR text after RTL should move caret towards right.
|
---|
| 18 | PASS textarea.value is "א!\nhelloאאbye"
|
---|
| 19 | Start position of caret is same
|
---|
| 20 | PASS beforeCaretPos[0]+beforeCaretPos[2] is afterCaretPos[0]
|
---|
| 21 | But end position differs
|
---|
| 22 | PASS beforeCaretPos[0]+beforeCaretPos[2] is not afterCaretPos[0]+afterCaretPos[2]
|
---|
| 23 | 4. Adding space, caret should move caret
|
---|
| 24 | PASS textarea.value is "א!\nhelloאאbye "
|
---|
| 25 | PASS afterCaretPos[0]+afterCaretPos[2] is > beforeCaretPos[0]+beforeCaretPos[2]
|
---|
| 26 | PASS successfullyParsed is true
|
---|
| 27 |
|
---|
| 28 | TEST COMPLETE
|
---|
| 29 |
|
---|