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

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

Issue 2848943002: Allow storing multiple replacements on SpellCheckResult (Closed)
Patch Set: Created 3 years, 8 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/spellcheck_message_filter_platform_mac_unittest.cc
diff --git a/chrome/browser/spellchecker/spellcheck_message_filter_platform_mac_unittest.cc b/chrome/browser/spellchecker/spellcheck_message_filter_platform_mac_unittest.cc
index e9810e86ad86f54625005675a8e3058e837ded78..5b18644a05b6926c13fb94a0d9fcbe2f76a53c59 100644
--- a/chrome/browser/spellchecker/spellcheck_message_filter_platform_mac_unittest.cc
+++ b/chrome/browser/spellchecker/spellcheck_message_filter_platform_mac_unittest.cc
@@ -32,9 +32,10 @@ TEST(SpellcheckMessageFilterPlatformMacTest, CombineResults) {
SpellCheckResult(SpellCheckResult::SPELLING, 10, 5));
// local & remote result - must be flagged SPELLING, uses remote suggestion.
- SpellCheckResult result(SpellCheckResult::SPELLING, 20, 5, local_suggestion);
+ SpellCheckResult result(SpellCheckResult::SPELLING, 20, 5,
+ std::vector<base::string16>({local_suggestion}));
local_results.push_back(result);
- result.replacement = remote_suggestion;
+ result.replacements[0] = remote_suggestion;
remote_results.push_back(result);
SpellCheckMessageFilterPlatform::CombineResults(&remote_results,
@@ -45,7 +46,7 @@ TEST(SpellcheckMessageFilterPlatformMacTest, CombineResults) {
EXPECT_EQ(0, remote_results[0].location);
EXPECT_EQ(SpellCheckResult::SPELLING, remote_results[1].decoration);
EXPECT_EQ(20, remote_results[1].location);
- EXPECT_EQ(remote_suggestion, remote_results[1].replacement);
+ EXPECT_EQ(remote_suggestion, remote_results[1].replacements[0]);
}
TEST(SpellCheckMessageFilterPlatformMacTest, TestOverrideThread) {

Powered by Google App Engine
This is Rietveld 408576698