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 3// found in the LICENSE file. 4 5// Module containing entities for regression tests of the generator. Entities 6// must never be modified, instead new entity must be added to add new tests. 7[JavaPackage="org.chromium.mojo.bindings.test.mojom.regression_tests"] 8module regression_tests; 9 10interface CheckMethodWithEmptyResponse { 11WithouParameterAndEmptyResponse() => (); 12WithParameterAndEmptyResponse(bool b) => (); 13}; 14 15interface CheckNameCollision { 16WithNameCollision(bool message, bool response) => (bool message, bool response); 17}; 18 19enum EnumWithReference { 20 k_STEREO_AND_KEYBOARD_MIC = 30, 21 k_MAX = k_STEREO_AND_KEYBOARD_MIC 22}; 23 24enum EnumWithLowercase { 25 PlanarF16, 26 PlanarF32 27}; 28 29enum EnumWithNumbers { 30 k_2_1 = 4 31}; 32 33enum EnumWithK { 34 K = 0 35}; 36 37struct Edge { 38 Vertex? v; 39}; 40 41struct Vertex { 42 EmptyStruct? e; 43}; 44 45struct EmptyStruct { 46}; 47 48struct A { 49 B? b; 50}; 51 52struct B { 53 A? a; 54}; 55 56// Previously, a field or parameter called |handles| would be shadowed by a 57// method parameter in generated C++ bindings code. 58struct HandlesNameCollisionStruct { 59 EmptyStruct handles; 60}; 61 62struct HandlesHandleNameCollisionStruct { 63 handle handles; 64}; 65 66union HandlesNameCollisionUnion { 67 int32 handles; 68}; 69 70struct HandlesUnionNameCollisionStruct { 71 HandlesNameCollisionUnion handles; 72}; 73 74interface HandlesNameCollisionInterface { 75 Method(EmptyStruct handles) => (handle handles); 76}; 77