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

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

Issue 654843005: Mojo JS Bindings: add support for associative arrays (Mojo map type) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a typo 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 {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 const int32 TEN_TOO = EType.E2; 101 const int32 TEN_TOO = EType.E2;
102 EType f0 = E0; // 0 102 EType f0 = E0; // 0
103 EType f1 = E1; // 1 103 EType f1 = E1; // 1
104 EType f2 = E2; // 10 104 EType f2 = E2; // 10
105 EType f3 = E3; // 10 105 EType f3 = E3; // 10
106 EType f4 = E4; // 11 106 EType f4 = E4; // 11
107 int32 f5 = TEN; 107 int32 f5 = TEN;
108 int32 f6 = ALSO_TEN; 108 int32 f6 = ALSO_TEN;
109 }; 109 };
110 110
111 } 111 // Used to verify that all possible Map key field types can be encoded and
112 // decoded successfully.
113
114 struct MapKeyTypes {
115 map<bool, bool> f0;
116 map<int8, int8> f1;
117 map<uint8, uint8> f2;
118 map<int16, int16> f3;
119 map<uint16, uint16> f4;
120 map<int32, int32> f5;
121 map<uint32, uint32> f6;
122 map<int64, int64> f7;
123 map<uint64, uint64> f8;
124 map<float, float> f9;
125 map<double, double> f10;
126 map<string, string> f11;
127 };
128
129 // Used to verify that some common value types can be encoded and decoded
130 // successfully.
131
132 struct MapValueTypes {
133 map<string, array<string>> f0;
134 map<string, array<string>?> f1;
135 map<string, array<string?>> f2;
136 };
137
138 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698