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

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

Issue 2034273002: Mojo C++ bindings: introduce mojo::WTFMap for blink bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed the code of adding enum key support to WTF::HashMap; which turned out to be non-trivial; wi… Created 4 years, 6 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 [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"] 5 [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"]
6 module mojo.test; 6 module mojo.test;
7 7
8 import "mojo/public/interfaces/bindings/tests/rect.mojom"; 8 import "mojo/public/interfaces/bindings/tests/rect.mojom";
9 9
10 struct NamedRegion { 10 struct NamedRegion {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 EType f3 = E3; // 10 106 EType f3 = E3; // 10
107 EType f4 = E4; // 11 107 EType f4 = E4; // 11
108 int32 f5 = TEN; 108 int32 f5 = TEN;
109 int32 f6 = ALSO_TEN; 109 int32 f6 = ALSO_TEN;
110 }; 110 };
111 111
112 // Used to verify that all possible Map key field types can be encoded and 112 // Used to verify that all possible Map key field types can be encoded and
113 // decoded successfully. 113 // decoded successfully.
114 114
115 struct MapKeyTypes { 115 struct MapKeyTypes {
116 map<bool, bool> f0; 116 // TODO(yzshen): WTF::HashMap doesn't support bool as key.
117 // map<bool, bool> f0;
117 map<int8, int8> f1; 118 map<int8, int8> f1;
118 map<uint8, uint8> f2; 119 map<uint8, uint8> f2;
119 map<int16, int16> f3; 120 map<int16, int16> f3;
120 map<uint16, uint16> f4; 121 map<uint16, uint16> f4;
121 map<int32, int32> f5; 122 map<int32, int32> f5;
122 map<uint32, uint32> f6; 123 map<uint32, uint32> f6;
123 map<int64, int64> f7; 124 map<int64, int64> f7;
124 map<uint64, uint64> f8; 125 map<uint64, uint64> f8;
125 map<float, float> f9; 126 map<float, float> f9;
126 map<double, double> f10; 127 map<double, double> f10;
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 371
371 struct ContainsOther { 372 struct ContainsOther {
372 int32 other; 373 int32 other;
373 }; 374 };
374 375
375 // Used to verify that structs can contain interface requests. 376 // Used to verify that structs can contain interface requests.
376 377
377 struct ContainsInterfaceRequest { 378 struct ContainsInterfaceRequest {
378 SomeInterface& request; 379 SomeInterface& request;
379 }; 380 };
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/wtf_map.h ('k') | mojo/public/interfaces/bindings/tests/test_wtf_types.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698