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

Side by Side Diff: tests/standalone/io/http_server_test.dart

Issue 48483002: Remove deprecated parts of dart:async. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 7 years, 1 month 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/standalone/io/http_cookie_test.dart ('k') | tests/standalone/io/https_server_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 import "dart:async"; 5 import "dart:async";
6 import "dart:io"; 6 import "dart:io";
7 7
8 import "package:async_helper/async_helper.dart"; 8 import "package:async_helper/async_helper.dart";
9 import "package:expect/expect.dart"; 9 import "package:expect/expect.dart";
10 10
(...skipping 10 matching lines...) Expand all
21 return request.close(); 21 return request.close();
22 }) 22 })
23 .then((response) { 23 .then((response) {
24 response.listen( 24 response.listen(
25 (_) {}, 25 (_) {},
26 onDone: () { 26 onDone: () {
27 client.close(); 27 client.close();
28 onDone(); 28 onDone();
29 }); 29 });
30 }) 30 })
31 .catchError((e) { 31 .catchError((e, trace) {
32 String msg = "Unexpected error in Http Client: $e"; 32 String msg = "Unexpected error in Http Client: $e";
33 var trace = getAttachedStackTrace(e);
34 if (trace != null) msg += "\nStackTrace: $trace"; 33 if (trace != null) msg += "\nStackTrace: $trace";
35 Expect.fail(msg); 34 Expect.fail(msg);
36 }); 35 });
37 } 36 }
38 37
39 // Test two connection after each other. 38 // Test two connection after each other.
40 asyncStart(); 39 asyncStart();
41 ServerSocket.bind("127.0.0.1", 0).then((s) { 40 ServerSocket.bind("127.0.0.1", 0).then((s) {
42 socket = s; 41 socket = s;
43 server = new HttpServer.listenOn(socket); 42 server = new HttpServer.listenOn(socket);
(...skipping 13 matching lines...) Expand all
57 socket.close(); 56 socket.close();
58 asyncEnd(); 57 asyncEnd();
59 }); 58 });
60 }); 59 });
61 }); 60 });
62 } 61 }
63 62
64 void main() { 63 void main() {
65 testListenOn(); 64 testListenOn();
66 } 65 }
OLDNEW
« no previous file with comments | « tests/standalone/io/http_cookie_test.dart ('k') | tests/standalone/io/https_server_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698