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

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

Issue 1800753005: C++ bindings: A struct's Deserialize() now does validation before deserializing. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fix char* - >char bug in unittest. FixedBuffer can accept sizes that aren't 8 byte multiples. Created 4 years, 9 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: mojo/public/cpp/bindings/tests/union_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/union_unittest.cc b/mojo/public/cpp/bindings/tests/union_unittest.cc
index afdfbbfd065a627ea0c86585ecc90c33e2758bae..13f3b5e34d8622850f4b2d7e2e66f38020722021 100644
--- a/mojo/public/cpp/bindings/tests/union_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/union_unittest.cc
@@ -663,8 +663,7 @@ TEST(UnionTest, Deserialize_NullableUnion) {
EXPECT_TRUE(small_struct->pod_union.is_null());
SmallStructPtr deserialized_struct = SmallStruct::New();
- deserialized_struct->Deserialize(buf);
-
+ EXPECT_TRUE(deserialized_struct->Deserialize(buf, sizeof(buf)));
EXPECT_TRUE(deserialized_struct->pod_union.is_null());
}

Powered by Google App Engine
This is Rietveld 408576698