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

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: Address zra's feedback 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..e55e6861b8ad5c405911c05e10580f983069a789 100644
--- a/mojo/dart/unittests/embedder_tests/bindings_generation_test.dart
+++ b/mojo/dart/unittests/embedder_tests/bindings_generation_test.dart
@@ -632,14 +632,16 @@ testValidateInterfaceType() {
_checkMojomInterface(mi, shortName, fullIdentifier, methodMap);
// The proxy and stub need to have a valid serviceDescription.
- var bcti_p = new validation.BoundsCheckTestInterfaceProxy.unbound().impl;
- var bcti_s = new validation.BoundsCheckTestInterfaceStub.unbound();
+ var boundsCheckProxyImpl =
+ new validation.BoundsCheckTestInterfaceProxy.unbound().impl;
+ var boundsCheckStubDescription =
+ validation.BoundsCheckTestInterfaceStub.serviceDescription;
_checkServiceDescription(
- bcti_p.serviceDescription, interfaceID, shortName, fullIdentifier,
- methodMap);
+ boundsCheckProxyImpl.serviceDescription, interfaceID, shortName,
+ fullIdentifier, methodMap);
_checkServiceDescription(
- bcti_s.serviceDescription, interfaceID, shortName, fullIdentifier,
+ boundsCheckStubDescription, interfaceID, shortName, fullIdentifier,
methodMap);
}
@@ -647,17 +649,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