blob: e1a12af8346e02b2560f12a2c0fb090477bd8a3f [file] [log] [blame]
Testcase for bug http://www.webkit.org/b/89649. The test case checks if caret is drawn properly(especially scrolls properly) inside a editable container having word-wrap:normal.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS successfullyParsed is true
TEST COMPLETE
To manually test, move the caret to the end of the line.
The content must scroll for the caret to reach the end of the editable text.
PASS editableContainer.scrollLeft > 0 is true
Final caret rect is calculated by following constraints
1) ScrollWidth = text content width + caret width
2) Caret rect is always within container bounding box (thus subtracting the scroll left)
PASS startCaretRect.left + editableContainer.scrollWidth - editableContainer.scrollLeft - caretWidth is finalCaretRect.right
PASS successfullyParsed is true
TEST COMPLETE