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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/interfaces/bindings/tests/test_structs.mojom
diff --git a/mojo/public/interfaces/bindings/tests/test_structs.mojom b/mojo/public/interfaces/bindings/tests/test_structs.mojom
index 6af00866fec053dbc001cc1572a839ca01d6e611..127af05e9ba9285b2733c0a76717c275a7a40ec2 100644
--- a/mojo/public/interfaces/bindings/tests/test_structs.mojom
+++ b/mojo/public/interfaces/bindings/tests/test_structs.mojom
@@ -108,4 +108,20 @@ struct ScopedConstants {
int32 f6 = ALSO_TEN;
};
+// Used to verify that all possible Map key field types can be encoded and
yzshen1 2014/10/15 05:58:02 int64 and uint64? :)
hansmuller 2014/10/15 21:45:46 JS can't really encode 64 bit integers properly bu
+// decoded successfully.
+
+struct MapFields {
+ map<bool, bool> f0;
+ map<int8, int8> f1;
+ map<uint8, uint8> f2;
+ map<int16, int16> f3;
+ map<uint16, uint16> f4;
+ map<int32, int32> f5;
+ map<uint32, uint32> f6;
+ map<float, float> f7;
+ map<double, double> f8;
+ map<string, string> f9;
qsr 2014/10/15 13:03:40 Do you want to test with structs, arrays and map a
hansmuller 2014/10/15 21:45:46 This test was just intended to verify that all pos
yzshen1 2014/10/15 22:22:13 (Out of curiosity) I thought the C++ bindings shou
hansmuller 2014/10/16 20:11:04 - The first two fail in the cpp parser: File "/
+};
+
}

Powered by Google App Engine
This is Rietveld 408576698