Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Side by Side Diff: mojo/public/interfaces/bindings/tests/test_structs.mojom

Issue 605443002: The default value for NullableString should be null (was "") (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added test fields with type double Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 import "mojo/public/interfaces/bindings/tests/rect.mojom" 5 import "mojo/public/interfaces/bindings/tests/rect.mojom"
6 6
7 [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"] 7 [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"]
8 module mojo.test { 8 module mojo.test {
9 9
10 struct NamedRegion { 10 struct NamedRegion {
11 string? name; 11 string? name;
12 Rect[]? rects; 12 Rect[]? rects;
13 }; 13 };
14 14
15 struct RectPair { 15 struct RectPair {
16 Rect? first; 16 Rect? first;
17 Rect? second; 17 Rect? second;
18 }; 18 };
19 19
20 struct EmptyStruct { 20 struct EmptyStruct {
21 }; 21 };
22 22
23 struct DefaultFieldValues {
24 bool f0;
25 int8 f1;
26 uint8 f2;
27 int16 f3;
yzshen1 2014/09/24 22:49:25 uint16 :)
hansmuller 2014/09/24 23:33:11 Done.
28 int32 f4;
29 uint32 f5;
30 int64 f6;
31 uint64 f7;
32 float f8;
33 double f9;
34 string f10;
35 string? f11;
36 handle<message_pipe> f12;
37 handle<data_pipe_consumer> f13;
38 handle<data_pipe_producer> f14;
39 handle<message_pipe>? f15;
40 handle<data_pipe_consumer>? f16;
41 handle<data_pipe_producer>? f17;
yzshen1 2014/09/24 22:49:25 (optional; if you want to) handle, handle?, handl
hansmuller 2014/09/24 23:33:11 I'd wanted to include all of the types, so yes. Th
42 string[] f18;
43 string?[] f19;
44 string[]? f20;
45 string?[]? f21;
46 EmptyStruct f22;
47 EmptyStruct? f23;
48 };
49
50 struct ExplicitFieldValues {
51 const string kFoo = "foo";
52 bool f0 = true;
53 int8 f1 = 100;
54 uint8 f2 = 100;
55 int16 f3 = 100;
yzshen1 2014/09/24 22:49:25 uint16 :)
hansmuller 2014/09/24 23:33:11 Done.
56 int32 f4 = 100;
57 uint32 f5 = 100;
58 int64 f6 = 100;
59 uint64 f7 = 100;
60 float f8 = 100;
61 float f9 = 100.0;
62 double f10 = 100;
63 double f11 = 100.0;
64 string f12 = kFoo;
65 string? f13 = kFoo;
66 Rect f14 = default;
67 Rect? f15 = default;
68 };
69
23 } 70 }
OLDNEW
« no previous file with comments | « no previous file | mojo/public/js/bindings/codec_unittests.js » ('j') | mojo/public/js/bindings/struct_unittests.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698