| Index: third_party/WebKit/LayoutTests/editing/spelling/spellcheck-marker.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/spelling/spellcheck-marker.html b/third_party/WebKit/LayoutTests/editing/spelling/spellcheck-marker.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..45ac9533bb09ee0b47cc129d73b44e9509baec3c
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/editing/spelling/spellcheck-marker.html
|
| @@ -0,0 +1,24 @@
|
| +<!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>
|
|
|