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

Side by Side Diff: mojo/dart/embedder/test/dart_to_cpp_tests.dart

Issue 816113004: Dart: Adds a content handler and a test. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Merge CLs that address comments Created 5 years, 11 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 unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698