blob: 0031fd005f67acf934ae3840e10e04930453f83f [file] [log] [blame]
<!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#.</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>