OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 import 'dart:async'; | 5 import 'dart:async'; |
6 import 'dart:isolate'; | 6 import 'dart:isolate'; |
7 import 'dart:typed_data'; | 7 import 'dart:typed_data'; |
8 import 'dart:convert'; | 8 import 'dart:convert'; |
9 | 9 |
10 import 'package:mojo/bindings.dart' as bindings; | 10 import 'package:mojo/bindings.dart' as bindings; |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 Map<int, String> methodMap = <int, String>{0: "Method0", 1: "Method1",}; | 646 Map<int, String> methodMap = <int, String>{0: "Method0", 1: "Method1",}; |
647 | 647 |
648 mojom_types.UserDefinedType udt = testValidationDescriptor[interfaceID]; | 648 mojom_types.UserDefinedType udt = testValidationDescriptor[interfaceID]; |
649 Expect.isNotNull(udt); | 649 Expect.isNotNull(udt); |
650 | 650 |
651 mojom_types.MojomInterface mi = udt.interfaceType; | 651 mojom_types.MojomInterface mi = udt.interfaceType; |
652 Expect.isNotNull(mi); | 652 Expect.isNotNull(mi); |
653 | 653 |
654 _checkMojomInterface(mi, shortName, fullIdentifier, methodMap); | 654 _checkMojomInterface(mi, shortName, fullIdentifier, methodMap); |
655 | 655 |
656 // The proxy and stub need to have a valid serviceDescription. | |
657 var boundsCheckProxyController = | |
658 new validation.BoundsCheckTestInterfaceProxy.unbound().ctrl; | |
659 var boundsCheckStubDescription = | 656 var boundsCheckStubDescription = |
660 validation.BoundsCheckTestInterfaceStub.serviceDescription; | 657 validation.BoundsCheckTestInterface.serviceDescription; |
661 | 658 |
662 _checkServiceDescription( | 659 _checkServiceDescription( |
663 boundsCheckProxyController.serviceDescription, interfaceID, shortName, | |
664 fullIdentifier, methodMap); | |
665 _checkServiceDescription( | |
666 boundsCheckStubDescription, interfaceID, shortName, fullIdentifier, | 660 boundsCheckStubDescription, interfaceID, shortName, fullIdentifier, |
667 methodMap); | 661 methodMap); |
668 } | 662 } |
669 | 663 |
670 _checkServiceDescription(service_describer.ServiceDescription sd, | 664 _checkServiceDescription(service_describer.ServiceDescription sd, |
671 String interfaceID, String shortName, String fullIdentifier, | 665 String interfaceID, String shortName, String fullIdentifier, |
672 Map<int, String> methodMap) { | 666 Map<int, String> methodMap) { |
673 // Check the top level interface, which must pass _checkMojomInterface. | 667 // Check the top level interface, which must pass _checkMojomInterface. |
674 Function identity = (v) => v; | 668 Function identity = (v) => v; |
675 mojom_types.MojomInterface mi = sd.getTopLevelInterface(identity); | 669 mojom_types.MojomInterface mi = sd.getTopLevelInterface(identity); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 testValidateMojomTypes(); | 749 testValidateMojomTypes(); |
756 testCamelCase(); | 750 testCamelCase(); |
757 testSerializeErrorMessage(); | 751 testSerializeErrorMessage(); |
758 await testEnums(); | 752 await testEnums(); |
759 await testCallResponse(); | 753 await testCallResponse(); |
760 await testAwaitCallResponse(); | 754 await testAwaitCallResponse(); |
761 await runOnClosedTest(); | 755 await runOnClosedTest(); |
762 await testRegression551(); | 756 await testRegression551(); |
763 await testServiceName(); | 757 await testServiceName(); |
764 } | 758 } |
OLD | NEW |