1 // Copyright 2013 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.
5 [JavaPackage="org.chromium.mojo.bindings.test.mojom.sample"]
8 import "sample_import.mojom";
9 import "sample_import2.mojom";
11 const uint8 kTwelve = 12;
12 const uint64 kTooBigForSignedInt64 = 9999999999999999999;
14 const double kDoubleInfinity = double.INFINITY;
15 const double kDoubleNegativeInfinity = double.NEGATIVE_INFINITY;
16 const double kDoubleNaN = double.NAN;
18 const float kFloatInfinity = float.INFINITY;
19 const float kFloatNegativeInfinity = float.NEGATIVE_INFINITY;
20 const float kFloatNaN = float.NAN;
32 Type type@3 = sample.Bar.Type.VERTICAL;
37 const string kFooby = "Fooby";
38 string name@8 = kFooby;
45 array<Bar>? extra_bars@7;
47 handle<message_pipe>? source@9;
48 array<handle<data_pipe_consumer>>? input_streams@10;
49 array<handle<data_pipe_producer>>? output_streams@11;
50 array<array<bool>>? array_of_array_of_bools@12;
51 array<array<array<string>>>? multi_array_of_strings@13;
52 array<bool>? array_of_bools@14;
57 uint8 a1@1 = sample.kTwelve;
61 uint32 a5@5 = 3456789012;
62 int64 a6@6 = -111111111111;
63 uint64 a7@7 = 9999999999999999999;
65 int32 a9@9 = -0x12345;
69 float a13@13 = 123.25;
70 double a14@14 = 1234567890.123;
72 double a16@16 = -1.2E+20;
73 double a17@17 = +1.23E-20;
75 // TODO(vtl): Add tests for default vs null when those are implemented (for
76 // structs, arrays, and strings).
80 Bar.Type a20@20 = BOTH;
81 imported.Point a21@21;
82 imported.Thing a22@22 = default;
84 uint64 a23@23 = 0xFFFFFFFFFFFFFFFF;
85 int64 a24@24 = 0x123456789;
86 int64 a25@25 = -0x123456789;
88 double a26@26 = double.INFINITY;
89 double a27@27 = double.NEGATIVE_INFINITY;
90 double a28@28 = double.NAN;
91 float a29@29 = float.INFINITY;
92 float a30@30 = float.NEGATIVE_INFINITY;
93 float a31@31 = float.NAN;
96 struct StructWithHoleV1 {
101 struct StructWithHoleV2 {
107 [Client=ServiceClient]
113 const uint8 kFavoriteBaz = 1;
114 Frobinate@0(Foo? foo@0, BazOptions baz@1, Port? port@2);
115 GetPort@1(Port& port @0);
118 interface ServiceClient {
119 DidFrobinate@0(int32 result@0);
122 // This interface is referenced above where it is defined. It also refers to
123 // itself from a method.
125 PostMessage@0(string message_text@0, Port port@1);