chromium/third_party/blink/web_tests/editing/undo/undo-misspellings.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><span>|XX</span></div>',
            selection => {
                selection.document.execCommand('insertText', false, 'sugare');
                selection.document.execCommand('insertText', false, ' ');
                selection.document.execCommand('insertText', false, 'sugari');
                selection.document.execCommand('insertText', false, ' ');
                selection.document.execCommand('insertText', false, 'sugarm');
                selection.document.execCommand('insertText', false, ' ');
                selection.document.execCommand('Undo');
            },
            '<div contenteditable><span>|XX</span></div>');
    }, 'Undo typing missspelling words');
</script>