blob: 45ac9533bb09ee0b47cc129d73b44e9509baec3c [file] [log] [blame]
<!DOCTYPE html>
<script src='../../resources/testharness.js'></script>
<script src='../../resources/testharnessreport.js'></script>
<script src='../../editing/assert_selection.js'></script>
<script>
test(function () {
assert_not_equals(window.internals, undefined,
'This test requires internals.');
assert_selection(
'<div contenteditable>^appla| </div>',
selection => {
const document = selection.document;
const start = selection.anchorOffset;
const end = selection.focusOffset;
assert_false(internals.hasSpellingMarker(document, start, end));
internals.setMarker(document, selection.getRangeAt(0), 'Spelling');
assert_true(internals.hasSpellingMarker(document, start, end));
internals.replaceMisspelled(document, 'apple');
},
'<div contenteditable>apple| </div>'
);
}, 'test setMarker and replaceMisspelled in internals');
</script>