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 import "mojo/public/interfaces/bindings/tests/rect.mojom"
7 [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"]
23 // Used to verify that struct fields which don't specify a deafult are
24 // initialized to: false for bool, 0 for numbers, and null for strings,
25 // handles, and structs. The "?" nullable suffix shouldn't have any
26 // impact on initial field values.
28 struct NoDefaultFieldValues {
42 handle<message_pipe> f13;
43 handle<data_pipe_consumer> f14;
44 handle<data_pipe_producer> f15;
45 handle<message_pipe>? f16;
46 handle<data_pipe_consumer>? f17;
47 handle<data_pipe_producer>? f18;
50 handle<shared_buffer> f21;
51 handle<shared_buffer>? f22;
60 // Used to verify that struct fields with an explicit default value
61 // are initialized correctly. The "?" nullable suffix shouldn't have any
62 // impact on initial field values.
64 struct DefaultFieldValues {
65 const string kFoo = "foo";