OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <body> | |
esprehn
2014/06/04 18:02:03
We usually leave off the <html>, <head> and <body>
| |
4 <script src="../../resources/js-test.js"></script> | |
5 <textarea id="textarea" dir="auto" style="font-size: 20px; width: 20ex; border: solid thin black; padding: 10px;">א!</textarea> | |
6 <script> | |
7 description('Test caret position in a textarea with direction auto and having RT L text. When entering a LTR text caret position is changed.'); | |
8 var textarea = document.getElementById('textarea'); | |
9 textarea.focus(); | |
10 var caretRect = textInputController.firstRectForCharacterRange(0, 0); | |
11 shouldBe('caretRect[0]', '198'); | |
12 shouldBe('caretRect[1]', '101'); | |
13 | |
14 window.testRunner.execCommand('MoveToEndOfLine'); | |
15 document.execCommand('InsertLineBreak'); | |
16 document.execCommand('InsertText', false, 'hello!'); | |
17 caretRect = textInputController.firstRectForCharacterRange(1, 0); | |
18 shouldBe('caretRect[0]', '187'); | |
19 shouldBe('caretRect[1]', '133'); | |
20 </script> | |
21 </body> | |
22 </html> | |
OLD | NEW |