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

Unified Diff: components/test_runner/spell_check_client.cc

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
« no previous file with comments | « components/test_runner/mock_grammar_check.cc ('k') | components/test_runner/test_runner.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/spell_check_client.cc
diff --git a/components/test_runner/spell_check_client.cc b/components/test_runner/spell_check_client.cc
index 75825f6f1218b55490501a0b5e9969d11f6c8520..68c663aa0a4c5763b5188bd66a62cccca9e0bf6d 100644
--- a/components/test_runner/spell_check_client.cc
+++ b/components/test_runner/spell_check_client.cc
@@ -10,6 +10,7 @@
#include "base/bind_helpers.h"
#include "base/logging.h"
#include "base/macros.h"
+#include "components/test_runner/mock_grammar_check.h"
#include "components/test_runner/test_runner.h"
#include "components/test_runner/web_task.h"
#include "components/test_runner/web_test_delegate.h"
@@ -65,6 +66,8 @@ void SpellCheckClient::checkTextOfParagraph(
offset += misspelled_position + misspelled_length;
}
}
+ if (mask & blink::WebTextCheckingTypeGrammar)
+ MockGrammarCheck::CheckGrammarOfString(text, &results);
web_results->assign(results);
}
@@ -119,6 +122,8 @@ void SpellCheckClient::FinishLastTextCheck() {
text = text.substr(misspelled_position + misspelled_length);
offset += misspelled_position + misspelled_length;
}
+ MockGrammarCheck::CheckGrammarOfString(last_requested_text_check_string_,
+ &results);
}
last_requested_text_checking_completion_->didFinishCheckingText(results);
last_requested_text_checking_completion_ = 0;
« no previous file with comments | « components/test_runner/mock_grammar_check.cc ('k') | components/test_runner/test_runner.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698