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

Unified Diff: mojo/public/interfaces/bindings/tests/struct_with_traits.mojom

Issue 2965663002: Mojo C++ bindings: support setting default value for fields whose types are typemapped enums. (Closed)
Patch Set: . Created 3 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
Index: mojo/public/interfaces/bindings/tests/struct_with_traits.mojom
diff --git a/mojo/public/interfaces/bindings/tests/struct_with_traits.mojom b/mojo/public/interfaces/bindings/tests/struct_with_traits.mojom
index b50409ee88f37e31b54175fdf460cf1050bad277..f53a188c63c01c423b7848c9d064dfe52ccf63b5 100644
--- a/mojo/public/interfaces/bindings/tests/struct_with_traits.mojom
+++ b/mojo/public/interfaces/bindings/tests/struct_with_traits.mojom
@@ -81,3 +81,9 @@ interface TraitsTestService {
EchoUnionWithTraits(UnionWithTraits u) => (UnionWithTraits passed);
};
+
+// Test that specifying default value for a typemapped enum field works.
+struct EnumWithTraitsContainer {
+ EnumWithTraits f_field = EnumWithTraits.VALUE_1;
+};
+
« no previous file with comments | « mojo/public/cpp/bindings/tests/struct_traits_unittest.cc ('k') | mojo/public/tools/bindings/generators/mojom_cpp_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698