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

Unified Diff: mojo/public/cpp/bindings/tests/validation_test_input_parser.h

Issue 327323003: Support [handles] in validation test input format and add handle-related tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « no previous file | mojo/public/cpp/bindings/tests/validation_test_input_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/tests/validation_test_input_parser.h
diff --git a/mojo/public/cpp/bindings/tests/validation_test_input_parser.h b/mojo/public/cpp/bindings/tests/validation_test_input_parser.h
index 8a4c95a584e776949fb54b6b10d66698be36b387..c8821cda5d89127e742f63e460840bedcd0b93c7 100644
--- a/mojo/public/cpp/bindings/tests/validation_test_input_parser.h
+++ b/mojo/public/cpp/bindings/tests/validation_test_input_parser.h
@@ -60,6 +60,12 @@ namespace test {
// data.
// Value Format: The value is an ID of the same format as that of dist4/8.
//
+// Type: handles
+// Description: The number of handles that are associated with the message. This
+// special item is not part of the message data. If specified, it should be the
+// first item.
+// Value Format: The same format as u1/2/4/8.
+//
// EXAMPLE:
//
// Suppose you have the following Mojo types defined:
@@ -99,12 +105,13 @@ namespace test {
// [anchr]bar
// Parses validation test input.
-// On success, |parsed_input| stores the parsing result and |error_message| is
-// cleared; on failure, |error_message| is set to a message describing the error
-// and |parsed_input| is cleared.
+// On success, |data| and |num_handles| store the parsing result,
+// |error_message| is cleared; on failure, |error_message| is set to a message
+// describing the error, |data| is cleared and |num_handles| set to 0.
// Note: For now, this method only works on little-endian platforms.
bool ParseValidationTestInput(const std::string& input,
- std::vector<uint8_t>* parsed_input,
+ std::vector<uint8_t>* data,
+ size_t* num_handles,
std::string* error_message);
} // namespace test
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/tests/validation_test_input_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698