| Index: third_party/WebKit/LayoutTests/editing/spelling/spelling-backward.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/spelling/spelling-backward.html b/third_party/WebKit/LayoutTests/editing/spelling/spelling-backward.html
|
| index 70d54fe8c976ef62e2f0f219acda8bd01d91ea33..4f52c9b970ab87dc8e67c9e9e5741df8213a528f 100644
|
| --- a/third_party/WebKit/LayoutTests/editing/spelling/spelling-backward.html
|
| +++ b/third_party/WebKit/LayoutTests/editing/spelling/spelling-backward.html
|
| @@ -1,31 +1,27 @@
|
| <!DOCTYPE html>
|
| -<html>
|
| -<body>
|
| -<script src="../../resources/js-test.js"></script>
|
| -<script src="../../editing/editing.js"></script>
|
| -<div id="div" contenteditable="true"></div>
|
| -<script>
|
| -description('This tests for a bug when moving the caret backward through '
|
| - + 'a misspelled word. Once the caret is no longer adjacent to it, '
|
| - + 'it should be marked as misspelled.');
|
| -
|
| -jsTestIsAsync = true;
|
| -if (window.testRunner)
|
| - testRunner.setMockSpellCheckerEnabled(true);
|
| -
|
| -var div = document.getElementById("div");
|
| -div.focus();
|
| -document.execCommand("InsertText", false, "This sentence ends with a misspelled word asd.");
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../assert_selection.js"></script>
|
| +<script src="spellcheck_test.js"></script>
|
|
|
| -moveSelectionBackwardByCharacterCommand();
|
| -moveSelectionBackwardByCharacterCommand();
|
| -moveSelectionBackwardByCharacterCommand();
|
| -moveSelectionBackwardByCharacterCommand();
|
| -moveSelectionBackwardByCharacterCommand();
|
| -moveSelectionBackwardByCharacterCommand();
|
| -
|
| -if (window.internals)
|
| - shouldBecomeEqual("internals.hasSpellingMarker(document, 42, 3)", "true", finishJSTest);
|
| +<script>
|
| +spellcheck_test(
|
| + '<div contenteditable>|</div>',
|
| + 'insertText This sentence ends with a misspelled word asd.',
|
| + '<div contenteditable>This sentence ends with a misspelled word #asd#.</div>',
|
| + {
|
| + title: 'Mark misspelled word "asd" after typing.',
|
| + callback: sample => spellcheck_test(
|
| + sample,
|
| + () => {
|
| + const selection = sample.selection;
|
| + selection.modify('move', 'backward', 'character');
|
| + selection.modify('move', 'backward', 'character');
|
| + selection.modify('move', 'backward', 'character');
|
| + selection.modify('move', 'backward', 'character');
|
| + selection.modify('move', 'backward', 'character');
|
| + },
|
| + '<div contenteditable>This sentence ends with a misspelled word #asd#.</div>',
|
| + 'Misspelled word should still be marked when caret is no longer adjacent with it.')
|
| + });
|
| </script>
|
| -</body>
|
| -</html>
|
|
|