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

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

Issue 2741943002: mojo bindings: Support enums with no values (Closed)
Patch Set: new test & template change Created 3 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/interfaces/bindings/tests/validation_test_interfaces.mojom
diff --git a/mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom b/mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom
index 2fb0d949b3e14d8b30c3cea7a731c84095aadb0d..ab69045e53bc43220718d38a07a159d053f456af 100644
--- a/mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom
+++ b/mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom
@@ -56,6 +56,13 @@ enum EnumB {
ENUM_B_2
};
+// A non-extensible enum with no values is valid, but about as useless as
+// you would expect: it will fail validation for all values.
+enum EmptyEnum {};
+
+[Extensible]
+enum ExtensibleEmptyEnum {};
+
union UnionA {
StructA struct_a;
bool b;
@@ -92,6 +99,8 @@ interface ConformanceTestInterface {
Method18(UnionA? param0);
Method19(Recursive recursive);
Method20(map<StructB, uint8> param0);
+ Method21(ExtensibleEmptyEnum param0);
+ Method22(EmptyEnum param0);
};
struct BasicStruct {

Powered by Google App Engine
This is Rietveld 408576698