Index: third_party/WebKit/LayoutTests/editing/spelling/inline-spelling-markers-hidpi-composited.html |
diff --git a/third_party/WebKit/LayoutTests/editing/spelling/inline-spelling-markers-hidpi-composited.html b/third_party/WebKit/LayoutTests/editing/spelling/inline-spelling-markers-hidpi-composited.html |
index 161351976135d1c0267d8e2824eb8f33bc4428ab..02b2255f7e6c26053d65a8f5f2318d9fa5e06cdf 100644 |
--- a/third_party/WebKit/LayoutTests/editing/spelling/inline-spelling-markers-hidpi-composited.html |
+++ b/third_party/WebKit/LayoutTests/editing/spelling/inline-spelling-markers-hidpi-composited.html |
@@ -26,7 +26,7 @@ |
<body> |
<script> |
-description("This tests the correct placement of inline spelling " |
+description("This tests the correct placement of inline spelling and grammar " |
+ "markers in text. Spelling markers should line up exactly under misspelled " |
+ "words in all cases."); |
@@ -67,15 +67,22 @@ function verifyMarkers() |
if (!window.internals) |
return done(); |
+ // Take care of spelling markers first. |
shouldBecomeEqual('internals.hasSpellingMarker(document, 8, 4)', 'true', function() { // Verifies 'adlj'. |
shouldBecomeEqual('internals.hasSpellingMarker(document, 13, 6)', 'true', function() { // Verifies 'adaasj'. |
- shouldBecomeEqual('internals.hasSpellingMarker(document, 20, 5)', 'true', function() { // Verifies 'sdklj'. |
+ shouldBecomeEqual('internals.hasSpellingMarker(document, 20, 5)', 'true', verifyGrammarMarkers) // Verifies 'sdklj'. |
+ }) |
+ }); |
+ |
+ function verifyGrammarMarkers() { |
+ shouldBecomeEqual('internals.hasGrammarMarker(document, 4, 3)', 'true', function() { // Verifies second 'the'. |
+ shouldBecomeEqual('internals.hasGrammarMarker(document, 33, 5)', 'true', function() { // Verifies second 'there'. |
// Markers of next element can not be found after modification selection without blur event. |
div.blur(); |
done(); |
}) |
- }) |
- }); |
+ }); |
+ } |
} |
var tests = [ function() { moveCursorOverAllWords('testLTR'); }, |