blob: 7579847e16cc0ce00feba309acc69f5431e01ad0 [file] [log] [blame]
<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
// Note that this tests the fix for this bug:
// rdar://problem/3765519 REGRESSION (Mail): word movement goes too far
// upstream at start of line.
selection_test(
'<div contenteditable>foo<br>bar ba|z</div>',
selection => selection.modify('move', 'backward', 'word'),
'<div contenteditable>foo<br>bar |baz</div>');
selection_test(
'<div contenteditable>foo<br>bar |baz</div>',
selection => selection.modify('move', 'backward', 'word'),
'<div contenteditable>foo<br>|bar baz</div>');
</script>