chromium/third_party/blink/web_tests/editing/selection/leave-requested-block.html

<!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>