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

Unified Diff: chrome/browser/spellchecker/feedback_sender_unittest.cc

Issue 15318004: Store feedback for spellcheck results from spelling service (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address comments Created 7 years, 7 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 | « chrome/browser/spellchecker/feedback.cc ('k') | chrome/browser/spellchecker/feedback_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/spellchecker/feedback_sender_unittest.cc
diff --git a/chrome/browser/spellchecker/feedback_sender_unittest.cc b/chrome/browser/spellchecker/feedback_sender_unittest.cc
index 23eaf5af88e0ba71b42770a6466da1ba9c1067a5..69e91b96d12cd87d5a4b4ff2a520b12c36a8e611 100644
--- a/chrome/browser/spellchecker/feedback_sender_unittest.cc
+++ b/chrome/browser/spellchecker/feedback_sender_unittest.cc
@@ -433,4 +433,19 @@ TEST_F(FeedbackSenderTest, FeedbackAPI) {
<< "\nActual data: " << actual_data;
}
+// Duplicate spellcheck results should be matched to the existing markers.
+TEST_F(FeedbackSenderTest, MatchDupliateResultsWithExistingMarkers) {
+ uint32 hash = AddPendingFeedback();
+ std::vector<SpellCheckResult> results(1, SpellCheckResult(
+ SpellCheckResult::SPELLING,
+ kMisspellingStart + 10,
+ kMisspellingLength,
+ ASCIIToUTF16("Hello")));
+ std::vector<SpellCheckMarker> markers(1, SpellCheckMarker(
+ hash, results[0].location));
+ EXPECT_EQ(static_cast<uint32>(0), results[0].hash);
+ feedback_.OnSpellcheckResults(&results, kRendererProcessId, kText, markers);
+ EXPECT_EQ(hash, results[0].hash);
+}
+
} // namespace spellcheck
« no previous file with comments | « chrome/browser/spellchecker/feedback.cc ('k') | chrome/browser/spellchecker/feedback_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698