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

Side by Side Diff: tests/isolate/global_error_handler_stream2_test.dart

Issue 23701010: Switch to async_helper package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase and adapt 3 new tests. Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test; 5 library test;
6 6
7 import 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:isolate'; 9 import 'dart:isolate';
10 import '../async_helper.dart'; 10 import "package:async_helper/async_helper.dart";
11 11
12 runTest() { 12 runTest() {
13 IsolateSink mainIsolate; 13 IsolateSink mainIsolate;
14 stream.listen((msg) { 14 stream.listen((msg) {
15 mainIsolate = msg; 15 mainIsolate = msg;
16 throw new UnsupportedError("ignore exception"); 16 throw new UnsupportedError("ignore exception");
17 }, onDone: () { 17 }, onDone: () {
18 mainIsolate.add("received done"); 18 mainIsolate.add("received done");
19 mainIsolate.close(); 19 mainIsolate.close();
20 }); 20 });
(...skipping 23 matching lines...) Expand all
44 asyncEnd(); 44 asyncEnd();
45 }); 45 });
46 asyncStart(); 46 asyncStart();
47 box.stream.single.then((msg) { 47 box.stream.single.then((msg) {
48 Expect.equals("received done", msg); 48 Expect.equals("received done", msg);
49 timer.cancel(); 49 timer.cancel();
50 keepRunningBox.stream.close(); 50 keepRunningBox.stream.close();
51 asyncEnd(); 51 asyncEnd();
52 }); 52 });
53 } 53 }
OLDNEW
« no previous file with comments | « tests/isolate/global_error_handler2_test.dart ('k') | tests/isolate/illegal_msg_stream_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698