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

Unified Diff: third_party/WebKit/LayoutTests/editing/spelling/markers.html

Issue 2211813002: Revert removal of grammar checking and marking code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor fix Created 4 years, 4 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: third_party/WebKit/LayoutTests/editing/spelling/markers.html
diff --git a/third_party/WebKit/LayoutTests/editing/spelling/markers.html b/third_party/WebKit/LayoutTests/editing/spelling/markers.html
index fe97fd888e58ab47678e3181db91c5e8b2b8ec27..bb0b7f455f17373f67c367d621a7b58d60bca047 100644
--- a/third_party/WebKit/LayoutTests/editing/spelling/markers.html
+++ b/third_party/WebKit/LayoutTests/editing/spelling/markers.html
@@ -14,7 +14,7 @@
<body>
<div id="container"></div>
<script>
-description("Tests spelling markers for misspellings.");
+description("Tests spelling and grammar markers for misspellings.");
jsTestIsAsync = true;
@@ -38,11 +38,14 @@ function typeText(elem, text) {
var container = document.getElementById('container');
+var elementWithGrammarIssue = createEditableElement(container);
+typeText(elementWithGrammarIssue, 'I have a issue.');
+
var elementWithSpellingIssue = createEditableElement(container);
typeText(elementWithSpellingIssue, 'zz.');
-var elementAlsoWithSpellingIssue = createEditableElement(container);
-typeText(elementAlsoWithSpellingIssue, 'orange,zz,apple.');
+var elementWithGrammarAndSpellingIssue = createEditableElement(container);
+typeText(elementWithGrammarAndSpellingIssue, 'orange,zz,apple.');
var element;
var next;
@@ -65,12 +68,15 @@ function verifyMarkers(e, misspellings) {
}
var misspellings = [
+ { marker:'grammar', issue:'a' },
{ marker:'spelling', issue:'zz' },
+ { marker:'grammar', issue:'orange,zz,apple.' }
];
var tests = [
- function() { verifyMarkers(elementWithSpellingIssue, misspellings.slice(0, 1)) },
- function() { verifyMarkers(elementAlsoWithSpellingIssue, misspellings.slice(0, 1)) },
+ function() { verifyMarkers(elementWithGrammarIssue, misspellings.slice(0, 1)) },
+ function() { verifyMarkers(elementWithSpellingIssue, misspellings.slice(1, 2)) },
+ function() { verifyMarkers(elementWithGrammarAndSpellingIssue, misspellings.slice(1, 3)) },
];
function done()

Powered by Google App Engine
This is Rietveld 408576698