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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/editing/caret/caret-direction-auto-expected.txt
diff --git a/LayoutTests/editing/caret/caret-direction-auto-expected.txt b/LayoutTests/editing/caret/caret-direction-auto-expected.txt
new file mode 100644
index 0000000000000000000000000000000000000000..e8d6805c054ed3e2116b949c706fbfff0f5030d7
--- /dev/null
+++ b/LayoutTests/editing/caret/caret-direction-auto-expected.txt
@@ -0,0 +1,29 @@
+Tests various scenarios for caret position when direction is auto
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS textarea.value is "א!"
+1. Caret is at right if text is in LTR direction
+PASS textarea.value is "א!\nhello"
+Compares lines if they are different
+PASS beforeCaretPos[1] is not afterCaretPos[1]
+New text is in LTR direction, start of caret will differ
+PASS beforeCaretPos[0] is > afterCaretPos[0]
+2. Addition of RTL text in middle of LTR text, caret moves to the left of the line.
+PASS textarea.value is "א!\nhelloאא"
+RTL text added will be move caret to start of position where hello begins
+PASS beforeCaretPos[0] is afterCaretPos[0]+afterCaretPos[2]
+3. Adding LTR text after RTL should move caret towards right.
+PASS textarea.value is "א!\nhelloאאbye"
+Start position of caret is same
+PASS beforeCaretPos[0]+beforeCaretPos[2] is afterCaretPos[0]
+But end position differs
+PASS beforeCaretPos[0]+beforeCaretPos[2] is not afterCaretPos[0]+afterCaretPos[2]
+4. Adding space, caret should move caret
+PASS textarea.value is "א!\nhelloאאbye "
+PASS afterCaretPos[0]+afterCaretPos[2] is > beforeCaretPos[0]+beforeCaretPos[2]
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
« 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