chromium/third_party/blink/web_tests/editing/deleting/delete_after_block_image.html

<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
// This tests to make sure that placing the caret in an empty paragraph after a block image and pressing delete removes the empty paragraph. The editable region below should contain only an image followed by a caret.
selection_test(
  [
    '<div contenteditable>',
      '<img src="../resources/abe.png" style="display:block; padding: 3px;">',
      '<div>|<br></div>',
    '</div>',
  ],
  'delete',
  [
    '<div contenteditable>',
      '<img src="../resources/abe.png" style="display:block; padding: 3px;">|',
    '</div>',
  ],
  '1 DeleteForward before BR in empty block');

selection_test(
  [
    '<div contenteditable>',
      '<img src="../resources/abe.png" style="display:block; padding: 3px;">',
      '|<br>',
    '</div>',
  ],
  'delete',
  [
    '<div contenteditable>',
      '<img src="../resources/abe.png" style="display:block; padding: 3px;">|',
    '</div>',
  ],
  '2 DeleteForward before BR');

selection_test(
  [
    '<div contenteditable>',
      '<img src="../resources/abe.png" style="display:block; padding: 3px;">',
      '<br>|',
    '</div>',
  ],
  'delete',
  [
    '<div contenteditable>',
      '<img src="../resources/abe.png" style="display:block; padding: 3px;">|',
    '</div>',
  ],
  '3 DeleteForward after BR');

selection_test(
  [
    '<div contenteditable>',
      '<img src="../resources/abe.png" style="display:block; padding: 3px;">',
      '<div>|abc</div>',
    '</div>',
  ],
  'delete',
  [
    '<div contenteditable>',
      '<img src="../resources/abe.png" style="display:block; padding: 3px;">',
      '|abc',
    '</div>',
  ],
  '4 DeleteForward at start of block');
</script>