blob: 1e9029f51b7304e653fa5074e94e172150dd4a4a [file] [log] [blame]
<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
// Test case for fix for https://bugs.webkit.org/show_bug.cgi?id=5354
// Changes were made to VisiblePosition's so that init() will not leave the
// block containing the requested position unless there are no VisiblePositions
// in that block.
selection_test(
[
'<div contenteditable><p>|abc</p></div>',
'<p style="overflow: hidden;">XYZ</p>',
],
selection => {
selection.modify('extend', 'forward', 'line');
selection.modify('extend', 'forward', 'line');
},
[
'<div contenteditable><p>^abc|</p></div>',
'<p style="overflow: hidden;">XYZ</p>',
]);
</script>