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

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: Address comments. DeserializeWithoutValidation returns void, doesn't take in buf_size. 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 95a2d7fd43bd4dbb322fa1d8483c1036e0495f2a..6be7945227166aa3f5cb253fddb22e7612b0b031 100644
--- a/mojo/public/cpp/bindings/tests/union_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/union_unittest.cc
@@ -661,8 +661,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