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

Unified Diff: mojo/public/cpp/bindings/tests/map_unittest.cc

Issue 2036623002: Validate map keys in C++ Mojo bindings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 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
« no previous file with comments | « mojo/public/cpp/bindings/lib/validation_util.h ('k') | mojo/public/cpp/bindings/tests/union_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/tests/map_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/map_unittest.cc b/mojo/public/cpp/bindings/tests/map_unittest.cc
index f0ab8e7d00724cef5c5b4b2ab9201173ffd3eb48..547960b28d1d10b4caad7db80ef54572ee4a281f 100644
--- a/mojo/public/cpp/bindings/tests/map_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/map_unittest.cc
@@ -300,7 +300,9 @@ TEST_F(MapTest, ArrayOfMap) {
FixedBufferForTesting buf(size);
Array_Data<Map_Data<int32_t, int8_t>*>* data;
ArrayValidateParams validate_params(
- 0, false, new ArrayValidateParams(0, false, nullptr));
+ 0, false, new ArrayValidateParams(
+ new ArrayValidateParams(0, false, nullptr),
+ new ArrayValidateParams(0, false, nullptr)));
mojo::internal::Serialize<Array<Map<int32_t, int8_t>>>(
array, &buf, &data, &validate_params, &context);
@@ -328,7 +330,10 @@ TEST_F(MapTest, ArrayOfMap) {
Array_Data<Map_Data<String_Data*, Array_Data<bool>*>*>* data;
ArrayValidateParams validate_params(
0, false, new ArrayValidateParams(
- 0, false, new ArrayValidateParams(0, false, nullptr)));
+ new ArrayValidateParams(
+ 0, false, new ArrayValidateParams(0, false, nullptr)),
+ new ArrayValidateParams(
+ 0, false, new ArrayValidateParams(0, false, nullptr))));
mojo::internal::Serialize<Array<Map<String, Array<bool>>>>(
array, &buf, &data, &validate_params, &context);
« no previous file with comments | « mojo/public/cpp/bindings/lib/validation_util.h ('k') | mojo/public/cpp/bindings/tests/union_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698