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

Unified Diff: mojo/dart/unittests/embedder_tests/bindings_generation_test.dart

Issue 1648803006: Expose Service Describer in Dart mojo package (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase Retest and Update Mojoms Created 4 years, 10 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/dart/unittests/embedder_tests/bindings_generation_test.dart
diff --git a/mojo/dart/unittests/embedder_tests/bindings_generation_test.dart b/mojo/dart/unittests/embedder_tests/bindings_generation_test.dart
index 39e3a777b6db825881efccf73c6fdb19d920b528..94bc3a0efe9b8ac169abe7c1dc732322d14dcfff 100644
--- a/mojo/dart/unittests/embedder_tests/bindings_generation_test.dart
+++ b/mojo/dart/unittests/embedder_tests/bindings_generation_test.dart
@@ -633,13 +633,13 @@ testValidateInterfaceType() {
// The proxy and stub need to have a valid serviceDescription.
var bcti_p = new validation.BoundsCheckTestInterfaceProxy.unbound().impl;
zra 2016/02/10 22:48:24 Dart style is to use lowerCamelCaps for identifier
alexfandrianto 2016/02/11 01:04:55 Done.
- var bcti_s = new validation.BoundsCheckTestInterfaceStub.unbound();
+ var bcti_s_sd = validation.BoundsCheckTestInterfaceStub.serviceDescription;
zra 2016/02/10 22:48:24 Maybe boundsCheckStub
alexfandrianto 2016/02/11 01:04:55 Done.
_checkServiceDescription(
bcti_p.serviceDescription, interfaceID, shortName, fullIdentifier,
methodMap);
_checkServiceDescription(
- bcti_s.serviceDescription, interfaceID, shortName, fullIdentifier,
+ bcti_s_sd, interfaceID, shortName, fullIdentifier,
methodMap);
}
@@ -647,17 +647,18 @@ _checkServiceDescription(service_describer.ServiceDescription sd,
String interfaceID, String shortName, String fullIdentifier,
Map<int, String> methodMap) {
// Check the top level interface, which must pass _checkMojomInterface.
- mojom_types.MojomInterface mi = sd.getTopLevelInterface();
+ Function identity = (v) => v;
+ mojom_types.MojomInterface mi = sd.getTopLevelInterface(identity);
_checkMojomInterface(mi, shortName, fullIdentifier, methodMap);
// Try out sd.GetTypeDefinition with the given interfaceID.
- mojom_types.UserDefinedType udt = sd.getTypeDefinition(interfaceID);
+ mojom_types.UserDefinedType udt = sd.getTypeDefinition(interfaceID, identity);
Expect.isNotNull(udt.interfaceType);
_checkMojomInterface(udt.interfaceType, shortName, fullIdentifier, methodMap);
// Check all type definitions. Reflect-wise, all data inside should match the
// imported Descriptor.
- var actualDescriptions = sd.getAllTypeDefinitions();
+ var actualDescriptions = sd.getAllTypeDefinitions(identity);
var expectedDescriptions = validation.getAllMojomTypeDefinitions();
Expect.mapEquals(actualDescriptions, expectedDescriptions);
}

Powered by Google App Engine
This is Rietveld 408576698