blob: e5c11df3f313d79a0fb0be7e94a3c1a0323ba610 [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".
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 substracting the scroll left)
PASS startCaretRect.left + editableContainer.scrollWidth - editableContainer.scrollLeft - caretWidth is finalCaretRect.right
PASS successfullyParsed is true
TEST COMPLETE