chromium/third_party/blink/web_tests/editing/spelling/spelling-marker-description.html

<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script src="spellcheck_test.js"></script>

<script>
spellcheck_test(
    '<div contenteditable>|</div>',
    'insertText wellcome. ',
    '<div contenteditable>#wellcome#.\u00A0</div>',
    {
      title: 'Mark misspelled word "wellcome".',
      callback: sample => test(() => {
          const document = sample.document;
          const textNode = document.querySelector('div').firstChild;
          assert_equals(
              internals.markerDescriptionForNode(textNode, 'spelling', 0),
              'welcome');
          sample.remove();
      }, 'Spelling marker on "wellcome" stores replacement text "welcome".')
    });
</script>