blob: 1cd19628725d86d79f94e6fbe1bd276e7497709c [file] [log] [blame]
Test -webkit-user-select all user select all area Test -webkit-user-select all
Test -webkit-user-select all selection movements and extensions (left right forward backward)
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
placeCaretBeforeUserSelectAllElement()
window.getSelection().modify('extend', 'forward', 'character')
FAIL Selection should be the entire user-select-all element at anchorNode: [object Text] anchorOffset: 0 focusNode: [object Text] focusOffset: 1
window.getSelection().modify('extend', 'backward', 'character')
PASS Selection is right before user-select-all element
window.getSelection().modify('extend', 'right', 'character')
FAIL Selection should be the entire user-select-all element at anchorNode: [object Text] anchorOffset: 0 focusNode: [object Text] focusOffset: 1
window.getSelection().modify('extend', 'left', 'character')
PASS Selection is right before user-select-all element
window.getSelection().modify('move', 'forward', 'character')
FAIL Selection should be right after user-select-all element at anchorNode: [object Text] anchorOffset: 1 focusNode: [object Text] focusOffset: 1
window.getSelection().modify('move', 'backward', 'character')
PASS Selection is right before user-select-all element
window.getSelection().modify('move', 'right', 'character')
FAIL Selection should be right after user-select-all element at anchorNode: [object Text] anchorOffset: 1 focusNode: [object Text] focusOffset: 1
window.getSelection().modify('move', 'left', 'character')
PASS Selection is right before user-select-all element
clickAt(descendant.offsetLeft + 10 , descendant.offsetTop + 10)
FAIL Selection should be the entire user-select-all element at anchorNode: [object Text] anchorOffset: 1 focusNode: [object Text] focusOffset: 1
mouseMoveFromTo(leftTarget.offsetLeft, descendant.offsetLeft + 20)
FAIL Selection should be the entire user-select-all element plus everything on its left at anchorNode: [object Text] anchorOffset: 0 focusNode: [object Text] focusOffset: 3
mouseMoveFromTo(userSelectAllElement.offsetLeft + userSelectAllElement.offsetWidth + rightTarget.offsetWidth, descendant.offsetLeft + 10)
FAIL Selection should be the entire user-select-all element plus everything on its right at anchorNode: [object Text] anchorOffset: 29 focusNode: [object Text] focusOffset: 1
PASS Selection is only the text in bold
PASS successfullyParsed is true
TEST COMPLETE