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

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

Issue 283623002: Add support for passing an arbitrary parameter to an IPC message handler. The motivation is for Web… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 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/spellcheck_message_filter_unittest.cc
===================================================================
--- chrome/browser/spellchecker/spellcheck_message_filter_unittest.cc (revision 270218)
+++ chrome/browser/spellchecker/spellcheck_message_filter_unittest.cc (working copy)
@@ -101,15 +101,13 @@
kRouteId, kCallbackId, kMarkers, kSuccess, kText, results);
EXPECT_EQ(static_cast<size_t>(1), filter->sent_messages.size());
- int sent_identifier = -1;
- bool sent_success = false;
- base::string16 sent_text;
- std::vector<SpellCheckResult> sent_results;
- bool ok = SpellCheckMsg_RespondSpellingService::Read(filter->sent_messages[0],
- &sent_identifier,
- &sent_success,
- &sent_text,
- &sent_results);
+ SpellCheckMsg_RespondSpellingService::Param params;
+ bool ok = SpellCheckMsg_RespondSpellingService::Read(
+ filter->sent_messages[0], & params);
+ int sent_identifier = params.a;
+ bool sent_success = params.b;
+ base::string16 sent_text = params.c;
+ std::vector<SpellCheckResult> sent_results = params.d;
EXPECT_TRUE(ok);
EXPECT_EQ(kCallbackId, sent_identifier);
EXPECT_EQ(kSuccess, sent_success);
@@ -134,15 +132,11 @@
true, base::ASCIIToUTF16("Helllo walrd"), results);
EXPECT_EQ(static_cast<size_t>(1), filter->sent_messages.size());
- int sent_identifier = -1;
- bool sent_success = false;
- base::string16 sent_text;
- std::vector<SpellCheckResult> sent_results;
- bool ok = SpellCheckMsg_RespondSpellingService::Read(filter->sent_messages[0],
- &sent_identifier,
- &sent_success,
- &sent_text,
- &sent_results);
+ SpellCheckMsg_RespondSpellingService::Param params;
+ bool ok = SpellCheckMsg_RespondSpellingService::Read(
+ filter->sent_messages[0], & params);
+ base::string16 sent_text = params.c;
+ std::vector<SpellCheckResult> sent_results = params.d;
EXPECT_TRUE(ok);
EXPECT_EQ(static_cast<size_t>(2), sent_results.size());
}

Powered by Google App Engine
This is Rietveld 408576698