| OLD | NEW |
| 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 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 UnionB j; | 62 UnionB j; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 union UnionB { | 65 union UnionB { |
| 66 uint16 a; | 66 uint16 a; |
| 67 uint32 b; | 67 uint32 b; |
| 68 uint64 c; | 68 uint64 c; |
| 69 uint32 d; | 69 uint32 d; |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 interface InterfaceA { | 72 interface InterfaceA{}; |
| 73 }; | |
| 74 | 73 |
| 75 // This interface is used for testing bounds-checking in the mojom | 74 // This interface is used for testing bounds-checking in the mojom |
| 76 // binding code. If you add a method please update the files | 75 // binding code. If you add a method please update the files |
| 77 // ./data/validation/boundscheck_*. If you add a response please update | 76 // ./data/validation/boundscheck_*. If you add a response please update |
| 78 // ./data/validation/resp_boundscheck_*. | 77 // ./data/validation/resp_boundscheck_*. |
| 79 [ServiceName="this.is.the.service.name.for.BoundsCheckTestInterface"] | 78 [ServiceName="this.is.the.service.name.for.BoundsCheckTestInterface"] |
| 80 interface BoundsCheckTestInterface { | 79 interface BoundsCheckTestInterface { |
| 81 Method0(uint8 param0) => (uint8 param0); | 80 Method0(uint8 param0) => (uint8 param0); |
| 82 Method1(uint8 param0); | 81 Method1(uint8 param0); |
| 83 }; | 82 }; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 109 Method0(BasicStruct param0) => (array<uint8> param0); | 108 Method0(BasicStruct param0) => (array<uint8> param0); |
| 110 }; | 109 }; |
| 111 | 110 |
| 112 // An enum generates a enum-value validation function, so we want to test it. | 111 // 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 | 112 // E.g., valid enum values for this enum should be: -3, 0, 1, 10 |
| 114 enum BasicEnum { | 113 enum BasicEnum { |
| 115 A, | 114 A, |
| 116 B, | 115 B, |
| 117 C = A, | 116 C = A, |
| 118 D = -3, | 117 D = -3, |
| 119 E = 0xA | 118 E = 0xA, |
| 120 }; | 119 }; |
| 121 | 120 |
| 122 // The enum validation function should be generated within the scope of this | 121 // The enum validation function should be generated within the scope of this |
| 123 // struct. | 122 // struct. |
| 124 struct StructWithEnum { | 123 struct StructWithEnum { |
| 125 enum EnumWithin { | 124 enum EnumWithin { |
| 126 A, B, C, D | 125 A, |
| 126 B, |
| 127 C, |
| 128 D, |
| 127 }; | 129 }; |
| 128 }; | 130 }; |
| OLD | NEW |