summaryrefslogtreecommitdiff
path: root/mojo/public/interfaces/bindings/tests/regression_tests.mojom
blob: d87a3ad65f3de14df7f7c3fe89159a50b64fb74b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// Copyright 2014 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 containing entities for regression tests of the generator. Entities
// must never be modified, instead new entity must be added to add new tests.
[JavaPackage="org.chromium.mojo.bindings.test.mojom.regression_tests"]
module regression_tests;

interface CheckMethodWithEmptyResponse {
WithouParameterAndEmptyResponse() => ();
WithParameterAndEmptyResponse(bool b) => ();
};

interface CheckNameCollision {
WithNameCollision(bool message, bool response) => (bool message, bool response);
};

enum EnumWithReference {
  k_STEREO_AND_KEYBOARD_MIC = 30,
  k_MAX = k_STEREO_AND_KEYBOARD_MIC
};

enum EnumWithLowercase {
  PlanarF16,
  PlanarF32
};

enum EnumWithNumbers {
  k_2_1 = 4
};

enum EnumWithK {
  K = 0
};

struct Edge {
  Vertex? v;
};

struct Vertex {
  EmptyStruct? e;
};

struct EmptyStruct {
};

struct A {
  B? b;
};

struct B {
  A? a;
};

// Previously, a field or parameter called |handles| would be shadowed by a
// method parameter in generated C++ bindings code.
struct HandlesNameCollisionStruct {
  EmptyStruct handles;
};

struct HandlesHandleNameCollisionStruct {
  handle handles;
};

union HandlesNameCollisionUnion {
  int32 handles;
};

struct HandlesUnionNameCollisionStruct {
  HandlesNameCollisionUnion handles;
};

interface HandlesNameCollisionInterface {
  Method(EmptyStruct handles) => (handle handles);
};