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

Unified Diff: LayoutTests/editing/spelling/move-cursor-to-misspelled-word.html

Issue 23534071: Use shouldBecomeEqual in asynchronous spellchecking tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Apply Tony's review and use asynchronous spellchecking in two tests Created 7 years, 3 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/move-cursor-to-misspelled-word.html
diff --git a/LayoutTests/editing/spelling/move-cursor-to-misspelled-word.html b/LayoutTests/editing/spelling/move-cursor-to-misspelled-word.html
index bb0c3a03dac99a60de71cd503579451ef0293c17..25c11937ca28266a2319f9a1ac5ea98dfed5f47c 100644
--- a/LayoutTests/editing/spelling/move-cursor-to-misspelled-word.html
+++ b/LayoutTests/editing/spelling/move-cursor-to-misspelled-word.html
@@ -10,6 +10,8 @@ description('Test if Chrome WebKit does not remove a misspelled marker when movi
'To test manually, type a misspelled word "zz " and type a left-arrow key to move the cursor on it.' +
'This test succeeds when "zz" is marked as misspelled.');
+jsTestIsAsync = true;
+
internals.settings.setAsynchronousSpellCheckingEnabled(true);
var node = document.getElementById('src');
node.focus();
@@ -17,7 +19,7 @@ document.execCommand("InsertText", false, 'z');
document.execCommand("InsertText", false, 'z');
document.execCommand("InsertText", false, ' ');
window.getSelection().modify('move', 'backward', 'character');
-shouldBeTrue('internals.hasSpellingMarker(document, 0, 2)');
+shouldBecomeEqual('internals.hasSpellingMarker(document, 0, 2)', 'true', finishJSTest);
</script>
<script src="../../fast/js/resources/js-test-post.js"></script>
</body>

Powered by Google App Engine
This is Rietveld 408576698