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

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

Issue 23701010: Switch to async_helper package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « tests/async_helper.dart ('k') | tests/isolate/global_error_handler_stream2_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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";
kustermann 2013/08/30 14:00:16 single quotes + sort?
floitsch 2013/08/30 14:15:36 This is an automated search/replace. So no.
11 11
12 runTest() { 12 runTest() {
13 SendPort mainIsolate; 13 SendPort mainIsolate;
14 bool isFirst = true; 14 bool isFirst = true;
15 port.receive((msg, replyTo) { 15 port.receive((msg, replyTo) {
16 if (isFirst) { 16 if (isFirst) {
17 mainIsolate = msg; 17 mainIsolate = msg;
18 isFirst = false; 18 isFirst = false;
19 throw new UnsupportedError("ignore exception"); 19 throw new UnsupportedError("ignore exception");
20 } 20 }
(...skipping 15 matching lines...) Expand all
36 otherIsolate.send(port.toSendPort()); 36 otherIsolate.send(port.toSendPort());
37 otherIsolate.send("message 2"); 37 otherIsolate.send("message 2");
38 asyncStart(); 38 asyncStart();
39 port.receive((msg, replyPort) { 39 port.receive((msg, replyPort) {
40 Expect.equals("received", msg); 40 Expect.equals("received", msg);
41 port.close(); 41 port.close();
42 timer.cancel(); 42 timer.cancel();
43 asyncEnd(); 43 asyncEnd();
44 }); 44 });
45 } 45 }
OLDNEW
« no previous file with comments | « tests/async_helper.dart ('k') | tests/isolate/global_error_handler_stream2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698