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

Unified Diff: mojo/dart/test/simple_handle_watcher_test.dart

Issue 800523004: Dart: Simplifies the handle watcher. Various cleanups and bugfixes. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: cleanup 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/dart/test/ping_pong_test.dart ('k') | mojo/public/dart/src/buffer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/dart/test/simple_handle_watcher_test.dart
diff --git a/mojo/dart/test/simple_handle_watcher_test.dart b/mojo/dart/test/simple_handle_watcher_test.dart
index 9e7bfcd4aefaf091158ef187253be0aa3581e802..6073fd83220b9efd37c394329edf17d99de498e1 100644
--- a/mojo/dart/test/simple_handle_watcher_test.dart
+++ b/mojo/dart/test/simple_handle_watcher_test.dart
@@ -13,17 +13,17 @@ main() {
var endpoint = pipe.endpoints[0];
assert(endpoint.handle.isValid);
- var handle = new core.MojoHandle(endpoint.handle);
+ var eventStream = new core.MojoEventStream(endpoint.handle);
var completer = new Completer();
int numEvents = 0;
- handle.enableWriteEvents();
- handle.listen((_) {
+ eventStream.listen((_) {
numEvents++;
- handle.close();
+ eventStream.close();
}, onDone: () {
completer.complete(numEvents);
});
+ eventStream.enableWriteEvents();
completer.future.then((int numEvents) {
assert(numEvents ==1);
« no previous file with comments | « mojo/dart/test/ping_pong_test.dart ('k') | mojo/public/dart/src/buffer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698