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

Unified Diff: ipc/ipc_message_utils_unittest.cc

Issue 12193012: Merge 179141 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1364/src/
Patch Set: Created 7 years, 10 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 | « ipc/ipc_message_utils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_utils_unittest.cc
===================================================================
--- ipc/ipc_message_utils_unittest.cc (revision 180507)
+++ ipc/ipc_message_utils_unittest.cc (working copy)
@@ -53,17 +53,19 @@
// Tests that detection of various bad parameters is working correctly.
TEST(IPCMessageUtilsTest, ParameterValidation) {
+ FilePath::StringType ok_string(FILE_PATH_LITERAL("hello"), 5);
+ FilePath::StringType bad_string(FILE_PATH_LITERAL("hel\0o"), 5);
+
+ // Change this if ParamTraits<FilePath>::Write() changes.
IPC::Message message;
- FilePath::StringType okString(FILE_PATH_LITERAL("hello"), 5);
- FilePath::StringType badString(FILE_PATH_LITERAL("hel\0o"), 5);
- FilePath okPath(okString);
- FilePath badPath(badString);
- ParamTraits<FilePath>::Write(&message, okPath);
- ParamTraits<FilePath>::Write(&message, badPath);
+ ParamTraits<FilePath::StringType>::Write(&message, ok_string);
+ ParamTraits<FilePath::StringType>::Write(&message, bad_string);
PickleIterator iter(message);
- ASSERT_TRUE(ParamTraits<FilePath>::Read(&message, &iter, &okPath));
- ASSERT_FALSE(ParamTraits<FilePath>::Read(&message, &iter, &badPath));
+ FilePath ok_path;
+ FilePath bad_path;
+ ASSERT_TRUE(ParamTraits<FilePath>::Read(&message, &iter, &ok_path));
+ ASSERT_FALSE(ParamTraits<FilePath>::Read(&message, &iter, &bad_path));
}
} // namespace IPC
« no previous file with comments | « ipc/ipc_message_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698