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

Unified Diff: chrome/browser/spellchecker/feedback_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: Move typedefs to feedback.h 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
Index: chrome/browser/spellchecker/feedback_unittest.cc
diff --git a/chrome/browser/spellchecker/feedback_unittest.cc b/chrome/browser/spellchecker/feedback_unittest.cc
index 2a8cfa26397559ef9ed9d99324798d95b926cb63..dca9cedb432cf64d8cf03e4eed7389e2faaf1f70 100644
--- a/chrome/browser/spellchecker/feedback_unittest.cc
+++ b/chrome/browser/spellchecker/feedback_unittest.cc
@@ -59,6 +59,17 @@ TEST_F(FeedbackTest, FinalizeRemovedMisspellings) {
EXPECT_FALSE(remaining_misspelling->action.IsFinal());
}
+// Duplicate misspellings should not be finalized.
+TEST_F(FeedbackTest, DuplicateMisspellingFinalization) {
groby-ooo-7-16 2013/05/23 19:10:50 Why a new test?
please use gerrit instead 2013/05/23 19:50:47 This test verifies that I fixed a bug. If Feedback
+ AddMisspelling(kRendererProcessId, kMisspellingHash);
+ AddMisspelling(kRendererProcessId, kMisspellingHash);
+ std::vector<uint32> remaining_markers(1, kMisspellingHash);
+ feedback_.FinalizeRemovedMisspellings(kRendererProcessId, remaining_markers);
+ std::vector<Misspelling> misspellings = feedback_.GetAllMisspellings();
+ EXPECT_EQ(static_cast<size_t>(1), misspellings.size());
+ EXPECT_FALSE(misspellings[0].action.IsFinal());
+}
+
// Misspellings should be associated with a renderer.
TEST_F(FeedbackTest, RendererHasMisspellings) {
EXPECT_FALSE(feedback_.RendererHasMisspellings(kRendererProcessId));

Powered by Google App Engine
This is Rietveld 408576698