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

Side by Side Diff: mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom

Issue 1741963002: Auto-formatted all .mojom files. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5 [DartPackage="_mojo_for_test_only",
6 [DartPackage="_mojo_for_test_only", JavaPackage="org.chromium.mojo.bindings.test .mojom.mojo"] 6 JavaPackage="org.chromium.mojo.bindings.test.mojom.mojo"]
7 module mojo.test; 7 module mojo.test;
8 8
9 struct StructA { 9 struct StructA {
10 uint64 i; 10 uint64 i;
11 }; 11 };
12 12
13 struct StructB { 13 struct StructB {
14 StructA struct_a; 14 StructA struct_a;
15 }; 15 };
16 16
17 struct StructC { 17 struct StructC {
18 array<uint8> data; 18 array<uint8> data;
19 }; 19 };
20 20
21 struct StructD { 21 struct StructD {
22 array<handle<message_pipe>> message_pipes; 22 array<handle<message_pipe>> message_pipes;
23 }; 23 };
24 24
25 struct StructE { 25 struct StructE {
26 StructD struct_d; 26 StructD struct_d;
27 handle<data_pipe_consumer> data_pipe_consumer; 27 handle<data_pipe_consumer> data_pipe_consumer;
28 }; 28 };
29 29
30 struct StructF { 30 struct StructF {
31 array<uint8, 3> fixed_size_array; 31 array<uint8, 3> fixed_size_array;
32 }; 32 };
33 33
34 struct StructG { 34 struct StructG {
35 int32 i; 35 int32 i;
36 [MinVersion=1] 36 [MinVersion=1] StructA? struct_a;
37 StructA? struct_a; 37 [MinVersion=3] string? str;
38 [MinVersion=3] 38 [MinVersion=3] bool b;
39 string? str;
40 [MinVersion=3]
41 bool b;
42 }; 39 };
43 40
44 struct StructH { 41 struct StructH {
45 bool a; 42 bool a;
46 uint8 b; 43 uint8 b;
47 UnionA? c; 44 UnionA? c;
48 array<UnionA>? d; 45 array<UnionA>? d;
49 map<uint8, UnionA>? e; 46 map<uint8, UnionA>? e;
50 }; 47 };
51 48
(...skipping 10 matching lines...) Expand all
62 UnionB j; 59 UnionB j;
63 }; 60 };
64 61
65 union UnionB { 62 union UnionB {
66 uint16 a; 63 uint16 a;
67 uint32 b; 64 uint32 b;
68 uint64 c; 65 uint64 c;
69 uint32 d; 66 uint32 d;
70 }; 67 };
71 68
72 interface InterfaceA { 69 interface InterfaceA {};
73 };
74 70
75 // This interface is used for testing bounds-checking in the mojom 71 // This interface is used for testing bounds-checking in the mojom
76 // binding code. If you add a method please update the files 72 // binding code. If you add a method please update the files
77 // ./data/validation/boundscheck_*. If you add a response please update 73 // ./data/validation/boundscheck_*. If you add a response please update
78 // ./data/validation/resp_boundscheck_*. 74 // ./data/validation/resp_boundscheck_*.
79 [ServiceName="this.is.the.service.name.for.BoundsCheckTestInterface"] 75 [ServiceName="this.is.the.service.name.for.BoundsCheckTestInterface"]
80 interface BoundsCheckTestInterface { 76 interface BoundsCheckTestInterface {
81 Method0(uint8 param0) => (uint8 param0); 77 Method0(uint8 param0) => (uint8 param0);
82 Method1(uint8 param0); 78 Method1(uint8 param0);
83 }; 79 };
(...skipping 25 matching lines...) Expand all
109 Method0(BasicStruct param0) => (array<uint8> param0); 105 Method0(BasicStruct param0) => (array<uint8> param0);
110 }; 106 };
111 107
112 // An enum generates a enum-value validation function, so we want to test it. 108 // An enum generates a enum-value validation function, so we want to test it.
113 // E.g., valid enum values for this enum should be: -3, 0, 1, 10 109 // E.g., valid enum values for this enum should be: -3, 0, 1, 10
114 enum BasicEnum { 110 enum BasicEnum {
115 A, 111 A,
116 B, 112 B,
117 C = A, 113 C = A,
118 D = -3, 114 D = -3,
119 E = 0xA 115 E = 0xA,
120 }; 116 };
121 117
122 // The enum validation function should be generated within the scope of this 118 // The enum validation function should be generated within the scope of this
123 // struct. 119 // struct.
124 struct StructWithEnum { 120 struct StructWithEnum {
125 enum EnumWithin { 121 enum EnumWithin {
126 A, B, C, D 122 A,
123 B,
124 C,
125 D,
127 }; 126 };
128 }; 127 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698