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

Unified Diff: mojo/public/interfaces/bindings/tests/test_structs.mojom

Issue 2339413004: Allow Mojo structs as map keys (Closed)
Patch Set: Address all review comments Created 4 years, 3 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 e3b0aff4c04b295094e029e1065b9845a9f6034d..a2e2b6445381253bb92c095dbff029e01eda4360 100644
--- a/mojo/public/interfaces/bindings/tests/test_structs.mojom
+++ b/mojo/public/interfaces/bindings/tests/test_structs.mojom
@@ -126,6 +126,8 @@ struct MapKeyTypes {
map<float, float> f9;
map<double, double> f10;
map<string, string> f11;
+ // TODO(tibell): JS/Java don't support struct as key.
+ // map<Rect, Rect> f12;
};
// Used to verify that various map value types can be encoded and decoded
@@ -386,3 +388,10 @@ struct ContainsInterfaceRequest {
struct SingleBoolStruct {
bool value;
};
+
+// Used to verify that structs containing typemapped types can be hashed (if the
+// typemapped type itself is hashable).
+
+struct ContainsHashable {
+ Rect rect;
Sam McNally 2016/09/22 05:40:52 TypemappedRect
tibell 2016/09/22 07:18:33 Done.
+};

Powered by Google App Engine
This is Rietveld 408576698