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> |