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

Unified Diff: LayoutTests/editing/spelling/spelling-huge-text.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/spelling-huge-text.html
diff --git a/LayoutTests/editing/spelling/spelling-huge-text.html b/LayoutTests/editing/spelling/spelling-huge-text.html
index 455f1636b33cf885b1f33ac49daf693112f3551f..0f136fa562b05ab6f675f642e8cb74f52c8cfc60 100644
--- a/LayoutTests/editing/spelling/spelling-huge-text.html
+++ b/LayoutTests/editing/spelling/spelling-huge-text.html
@@ -41,17 +41,6 @@ function test()
internals.settings.setUnifiedTextCheckerEnabled(true);
internals.settings.setAsynchronousSpellCheckingEnabled(true);
- function waitForMarkersToAppear(node, nretry)
- {
- if (nretry > 0 && internals.markerCountForNode(node, "spelling") < 6) {
- window.setTimeout(function() { waitForMarkersToAppear(node, nretry - 1); }, 1);
- } else {
- shouldBe('internals.markerCountForNode(testEditable.childNodes[0], "spelling")', '6');
- testEditable.removeChild(testEditable.childNodes[0]);
- finishJSTest();
- }
- }
-
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
@@ -60,7 +49,10 @@ function test()
internals.setContinuousSpellCheckingEnabled(false);
testEditable.focus();
internals.setContinuousSpellCheckingEnabled(true);
- waitForMarkersToAppear(testEditable.childNodes[0], 10);
+ shouldBecomeEqual('internals.markerCountForNode(testEditable.childNodes[0], "spelling")', '6', function() {
+ testEditable.removeChild(testEditable.childNodes[0]);
+ finishJSTest();
+ });
}
</script>
<script src="../../fast/js/resources/js-test-post.js"></script>

Powered by Google App Engine
This is Rietveld 408576698