chromium/third_party/blink/web_tests/editing/inserting/4959067.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 insertion over a fully selected special element
// doesn't do expansion.
selection_test(
  [
    '<div contenteditable>',
      '<ul><li><a href="http://www.google.com/" id="anchor">^ab|</a></li></ul>',
    '</div>',
  ],
  selection => {
    const anchor = selection.document.getElementById('anchor');
    selection.document.execCommand('insertText', false, 'CD');
    assert_equals(anchor, selection.document.getElementById('anchor'),
                  'We should keep an A element');
  },
  [
    '<div contenteditable>',
      '<ul><li><a href="http://www.google.com/" id="anchor">CD|</a></li></ul>',
    '</div>',
  ],
  'insertText to replace contents of A');
</script>