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

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

Issue 13724021: Remove deprecated Expect from the libraries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 'dart:async'; 8 import 'dart:async';
8 import 'dart:isolate'; 9 import 'dart:isolate';
9 10
10 runTest() { 11 runTest() {
11 IsolateSink mainIsolate; 12 IsolateSink mainIsolate;
12 stream.listen((msg) { 13 stream.listen((msg) {
13 mainIsolate = msg; 14 mainIsolate = msg;
14 throw new RuntimeError("ignore exception"); 15 throw new RuntimeError("ignore exception");
15 }, onDone: () { 16 }, onDone: () {
16 mainIsolate.add("received done"); 17 mainIsolate.add("received done");
(...skipping 22 matching lines...) Expand all
39 // the handling of the previous event. We therefore delay the closing. 40 // the handling of the previous event. We therefore delay the closing.
40 // Note: if the done is sent too early it won't lead to failing tests, but 41 // Note: if the done is sent too early it won't lead to failing tests, but
41 // just won't make sure that the globalErrorHandler works. 42 // just won't make sure that the globalErrorHandler works.
42 new Timer(const Duration(milliseconds: 10), otherIsolate.close); 43 new Timer(const Duration(milliseconds: 10), otherIsolate.close);
43 box.stream.single.then((msg) { 44 box.stream.single.then((msg) {
44 Expect.equals("received done", msg); 45 Expect.equals("received done", msg);
45 timer.cancel(); 46 timer.cancel();
46 keepRunningBox.stream.close(); 47 keepRunningBox.stream.close();
47 }); 48 });
48 } 49 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698