chromium/third_party/blink/web_tests/editing/spelling/cancel_check.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>zz.|</div>',
    '',
    '<div contenteditable>#zz#.</div>',
    {
      title: 'Setup a contenteditable div with spelling marker',
      callback: sample => spellcheck_test(
          sample,
          document => {
            document.execCommand('insertText', false, ' zz.');
            if (window.internals) {
              internals.runIdleTimeSpellChecker(document);
              internals.cancelCurrentSpellCheckRequest(document);
            }
          },
          '<div contenteditable>#zz#. zz.</div>',
          'Canceled spellcheck request should not remove existing marker')
    });
</script>