chromium/third_party/blink/web_tests/editing/selection/collapse/collapse_selection_after_table.html

<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>
// Test collapsing the selection of a paragraph after a table
// leaves the caret in the right position.
selection_test(
    [
        '<div contenteditable="true">',
            '<table border="1"><tbody><tr>',
                '<td>The caret should be between these two parenthesis: (</td>',
                '<td contenteditable="false"></td>',
            '</tr></tbody></table>',
            '<div id="div">)</div>',
        '</div>'
    ],
    selection => {
        var div = selection.document.getElementById("div");
        selection.collapse(div, 0);
    },
    [
        '<div contenteditable="true">',
            '<table border="1"><tbody><tr>',
                '<td>The caret should be between these two parenthesis: (</td>',
                '<td contenteditable="false"></td>',
            '</tr></tbody></table>',
            '<div id="div">|)</div>',
        '</div>'
    ],
    'Deleting from the start of a paragraph after a table');
</script>