summaryrefslogtreecommitdiff
path: root/mojo/public/interfaces/bindings/tests/test_wtf_types.mojom
diff options
context:
space:
mode:
Diffstat (limited to 'mojo/public/interfaces/bindings/tests/test_wtf_types.mojom')
-rw-r--r--mojo/public/interfaces/bindings/tests/test_wtf_types.mojom50
1 files changed, 50 insertions, 0 deletions
diff --git a/mojo/public/interfaces/bindings/tests/test_wtf_types.mojom b/mojo/public/interfaces/bindings/tests/test_wtf_types.mojom
new file mode 100644
index 0000000000..183f184ef3
--- /dev/null
+++ b/mojo/public/interfaces/bindings/tests/test_wtf_types.mojom
@@ -0,0 +1,50 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module mojo.test;
+
+struct TestWTFCodeGeneration {
+ string str;
+ string? nullable_str;
+ array<string> strs;
+ array<string?> nullable_strs;
+ array<array<int32>> arrays;
+ array<bool> bools;
+ array<handle<message_pipe>> handles;
+ map<string, string?> str_map;
+ map<int32, array<int32>> array_map;
+ map<int32, handle<message_pipe>> handle_map;
+ array<map<string, string?>> str_maps;
+};
+
+union TestWTFCodeGeneration2 {
+ string str;
+ array<string> strs;
+ map<string, string?> str_map;
+};
+
+struct TestWTFStruct {
+ enum NestedEnum {
+ E0,
+ E1,
+ };
+ string str;
+ int32 integer;
+};
+
+interface TestWTF {
+ enum NestedEnum {
+ E0,
+ E1,
+ };
+ EchoString(string? str) => (string? str);
+ EchoStringArray(array<string?>? arr) => (array<string?>? arr);
+ EchoStringMap(map<string, string?>? str_map)
+ => (map<string, string?>? str_map);
+};
+
+enum TopLevelEnum {
+ E0,
+ E1,
+};