Commit 9af2f22e authored by Xiaocheng Hu's avatar Xiaocheng Hu Committed by Commit Bot

Add a web test for up/down caret movement

This patch adds a web test to ensure that up/down caret movements don't
cross text control boundaries. This is preparation for implementing hit
test based up and down movements.

Bug: 950728
Change-Id: I850282798afb6f5ece6073d3910b7f988b93860f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1603345
Auto-Submit: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658419}
parent 6fc31c30
<!DOCTYPE html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>
selection_test(
[
'<div contenteditable>',
'foo ba|r<br>',
'foo <input value="bar">',
'</div>'
],
selection => selection.modify('move', 'forward', 'line'),
[
'<div contenteditable>',
'foo bar<br>',
'foo |<input value="bar">',
'</div>'
],
'Move forward line should not enter text control');
selection_test(
[
'<div contenteditable>',
'foo <input value="bar"><br>',
'foo ba|r',
'</div>'
],
selection => selection.modify('move', 'backward', 'line'),
[
'<div contenteditable>',
'foo |<input value="bar"><br>',
'foo bar',
'</div>'
],
'Move backward line should not enter text control');
</script>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment