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

Unified Diff: LayoutTests/editing/selection/caret-in-textarea-auto.html

Issue 302433015: Use correct offset when attribute auto is present (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated to latest master Created 6 years, 7 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/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..0ec66b3197718cecdf682f581bd17cbe56c2bb93
--- /dev/null
+++ b/LayoutTests/editing/selection/caret-in-textarea-auto.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>
+This tests that typing in a textarea with direction auto and having RTL text. When entering a LTR text caret position is changed.
+To test manually, click at the end of RTL text and press enter. Then enter text, caret should move along with the text.
+</p>
+<textarea id="textarea" dir="auto" style="font-size: 20px; width: 20ex; border: solid thin black; padding: 10px;">&#x05d0;!</textarea>
+<script src="../editing.js"></script>
+<script>
+var textarea = document.getElementById('textarea');
+textarea.focus();
+window.testRunner.execCommand('MoveToEndOfLine');
+document.execCommand('InsertLineBreak');
+document.execCommand('InsertText', false, 'hello!');
+caretRect = textInputController.firstRectForCharacterRange(1, 0);
leviw_travelin_and_unemployed 2014/05/28 17:42:31 Can we test this programmatically instead of using
Habib Virji 2014/05/29 07:58:26 A valid point will correct it. Was planning to use
Habib Virji 2014/05/29 11:31:51 Done.
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698