| 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:mojo_bindings' as bindings; | 6 import 'dart:mojo_bindings' as bindings; |
| 7 import 'dart:mojo_core' as core; | 7 import 'dart:mojo_core' as core; |
| 8 import 'dart:typed_data'; | 8 import 'dart:typed_data'; |
| 9 | 9 |
| 10 import 'package:mojo/dart/embedder/test/dart_to_cpp.mojom.dart'; | 10 import 'package:mojo/dart/embedder/test/dart_to_cpp.mojom.dart'; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 } | 90 } |
| 91 callTestFinished(); | 91 callTestFinished(); |
| 92 _completer.complete(null); | 92 _completer.complete(null); |
| 93 } | 93 } |
| 94 | 94 |
| 95 Future<bool> get future => _completer.future; | 95 Future<bool> get future => _completer.future; |
| 96 } | 96 } |
| 97 | 97 |
| 98 | 98 |
| 99 main(List args) { | 99 main(List args) { |
| 100 assert(args.length == 1); | 100 assert(args.length == 2); |
| 101 int mojoHandle = args[0]; | 101 int mojoHandle = args[0]; |
| 102 var rawHandle = new core.MojoHandle(mojoHandle); | 102 var rawHandle = new core.MojoHandle(mojoHandle); |
| 103 var endpoint = new core.MojoMessagePipeEndpoint(rawHandle); | 103 var endpoint = new core.MojoMessagePipeEndpoint(rawHandle); |
| 104 var dartSide = new DartSide(endpoint); | 104 var dartSide = new DartSide(endpoint); |
| 105 dartSide.listen(); | 105 dartSide.listen(); |
| 106 dartSide.callStartTest(); | 106 dartSide.callStartTest(); |
| 107 dartSide.future.then((_) { | 107 dartSide.future.then((_) { |
| 108 print('Success'); | 108 print('Success'); |
| 109 }); | 109 }); |
| 110 } | 110 } |
| OLD | NEW |