Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: LayoutTests/editing/spelling/spelling-backward.html

Issue 225183005: Refactoring editing/selection/13804.html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/editing/spelling/spelling-backward.html
diff --git a/LayoutTests/editing/spelling/spelling-backward.html b/LayoutTests/editing/spelling/spelling-backward.html
new file mode 100644
index 0000000000000000000000000000000000000000..f2dc5145e6b87fbf6e6ff725ae00def05a01255a
--- /dev/null
+++ b/LayoutTests/editing/spelling/spelling-backward.html
@@ -0,0 +1,34 @@
+<!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.internals) {
+ internals.settings.setUnifiedTextCheckerEnabled(true);
+ internals.settings.setAsynchronousSpellCheckingEnabled(true);
+}
+
+var div = document.getElementById("div");
+div.focus();
+document.execCommand("InsertText", false, "This sentence ends with a misspelled word asd.");
+
+moveSelectionBackwardByCharacterCommand();
+moveSelectionBackwardByCharacterCommand();
+moveSelectionBackwardByCharacterCommand();
+moveSelectionBackwardByCharacterCommand();
+moveSelectionBackwardByCharacterCommand();
+moveSelectionBackwardByCharacterCommand();
+
+if (window.internals)
+ shouldBecomeEqual("internals.hasSpellingMarker(document, 42, 3)", "true", finishJSTest);
+</script>
+</body>
+</html>
« no previous file with comments | « LayoutTests/editing/selection/13804-expected.txt ('k') | LayoutTests/editing/spelling/spelling-backward-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698