Index: LayoutTests/editing/spelling/grammar-markers-hidpi.html |
diff --git a/LayoutTests/editing/spelling/grammar-markers-hidpi.html b/LayoutTests/editing/spelling/grammar-markers-hidpi.html |
index 1b27e4d5f7378d0e9db5a60b0e800abc574306c0..43da74bcd995c1e5d3b0e34699c867732f29cd1c 100644 |
--- a/LayoutTests/editing/spelling/grammar-markers-hidpi.html |
+++ b/LayoutTests/editing/spelling/grammar-markers-hidpi.html |
@@ -15,26 +15,19 @@ jsTestIsAsync = true; |
if (window.internals) |
internals.settings.setAsynchronousSpellCheckingEnabled(true); |
-var retryCount = 10; |
-var sleepPeriod = 1; |
-var ungrammaticalPhrase = 'has'; |
-var hasMarker; |
-function verifyMarker() { |
- hasMarker = internals.hasGrammarMarker(document, target.innerHTML.indexOf(ungrammaticalPhrase), ungrammaticalPhrase.length); |
- if (!hasMarker && --retryCount > 0) { |
- sleepPeriod *= 2; |
- window.setTimeout(verifyMarker, sleepPeriod); |
- return; |
- } |
- |
- shouldBeTrue('hasMarker'); |
- finishJSTest(); |
-}; |
+function verifyGrammarMarker(destination, ungrammaticalPhrase) |
+{ |
+ if (internals.hasGrammarMarker(document, destination.innerHTML.indexOf(ungrammaticalPhrase), ungrammaticalPhrase.length)) { |
+ testPassed("ungrammatical phrase '" + ungrammaticalPhrase + "' on '" + destination.innerHTML + "'"); |
+ return true; |
+ } else |
+ return false; |
+} |
if (window.testRunner) { |
testRunner.dumpAsText(true); |
testRunner.setBackingScaleFactor(2, function () { |
- verifyMarker(); |
+ shouldBecomeEqual('verifyGrammarMarker(target, "has")', 'true', finishJSTest); |
}); |
} |