Index: LayoutTests/editing/selection/caret-in-textarea-auto.html |
diff --git a/LayoutTests/editing/selection/caret-in-textarea-auto.html b/LayoutTests/editing/selection/caret-in-textarea-auto.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2c3ad14965c6e99c96c0e477f3a08d3138ac3612 |
--- /dev/null |
+++ b/LayoutTests/editing/selection/caret-in-textarea-auto.html |
@@ -0,0 +1,16 @@ |
+<!DOCTYPE html> |
+<script src="../../resources/js-test.js"></script> |
+<textarea id="textarea" dir="auto" style="font-size: 20px; width: 20ex; border: solid thin black; padding: 10px;">א!</textarea> |
+<script> |
+description('Test caret position in a textarea with direction auto and having RTL text. When entering a LTR text caret position is changed.'); |
+var textarea = document.getElementById('textarea'); |
+textarea.focus(); |
+var caretRect = textInputController.firstRectForCharacterRange(0, 0); |
+ |
+window.testRunner.execCommand('MoveToEndOfLine'); |
+document.execCommand('InsertLineBreak'); |
+document.execCommand('InsertText', false, 'hell'); |
+ |
+var caretRect1 = textInputController.firstRectForCharacterRange(1, 0); |
+shouldNotBe('caretRect[0]', 'caretRect1[0]'); |
+</script> |