chromium/third_party/blink/web_tests/editing/execCommand/selection_image_after_alignment_change.html

<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
test(() => assert_selection(
  [
  '<div contenteditable>',
    'foo<br>',
    '|<img src="../resources/abe.png"><br>',
    'baz',
  '</div>',
  ],
  'JustifyCenter',
  [
  '<div contenteditable>',
    'foo<br>',
    '<div style="text-align: center;">',
      '|<img src="../resources/abe.png">',
    '</div>',
    'baz',
  '</div>',
  ]),
  '1 JustifyCenter shoudld centralize the image without changing the selection.');

test(() => assert_selection(
  [
  '<div contenteditable>',
    'foo<br>',
    '^<img src="../resources/abe.png">|<br>',
    'baz',
  '</div>',
  ],
  'JustifyCenter',
  [
  '<div contenteditable>',
    'foo<br>',
    '<div style="text-align: center;">',
      '^<img src="../resources/abe.png">|',
    '</div>',
    'baz',
  '</div>',
  ]),
    "2 JustifyCenter shoudld centralize the image without changing the selection.");
</script>