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

Side by Side Diff: LayoutTests/editing/caret/caret-direction-auto-expected.txt

Issue 541823003: Move caret to correct position when dir=auto (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Compile fix for Windows Created 6 years, 3 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 unified diff | Download patch
OLDNEW
(Empty)
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 li ne.
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
OLDNEW
« no previous file with comments | « LayoutTests/editing/caret/caret-direction-auto.html ('k') | LayoutTests/editing/selection/caret-in-textarea-auto.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698