1Tests various scenarios for caret position when direction is auto
2
3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6PASS textarea.value is "א!"
71. Caret is at right if text is in LTR direction
8PASS textarea.value is "א!\nhello"
9Compares lines if they are different
10PASS beforeCaretPos[1] is not afterCaretPos[1]
11New text is in LTR direction, start of caret will differ
12PASS beforeCaretPos[0] is > afterCaretPos[0]
132. Addition of RTL text in middle of LTR text, caret moves to the left of the line.
14PASS textarea.value is "א!\nhelloאא"
15RTL text added will be move caret to start of position where hello begins
16PASS beforeCaretPos[0] is afterCaretPos[0]+afterCaretPos[2]
173. Adding LTR text after RTL should move caret towards right.
18PASS textarea.value is "א!\nhelloאאbye"
19Start position of caret is same
20PASS beforeCaretPos[0]+beforeCaretPos[2] is afterCaretPos[0]
21But end position differs
22PASS beforeCaretPos[0]+beforeCaretPos[2] is not afterCaretPos[0]+afterCaretPos[2]
234. Adding space, caret should move caret
24PASS textarea.value is "א!\nhelloאאbye "
25PASS afterCaretPos[0]+afterCaretPos[2] is > beforeCaretPos[0]+beforeCaretPos[2]
26PASS successfullyParsed is true
27
28TEST COMPLETE
29
1layer at (0,0) size 800x600
2 LayoutView at (0,0) size 800x600
3layer at (0,0) size 800x600
4 LayoutBlockFlow {HTML} at (0,0) size 800x600
5 LayoutBlockFlow {BODY} at (8,8) size 784x584