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

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

Issue 14150002: Remove StreamSink(replaced by EventSink) and make IOSink extend EventSink. (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 // VMOptions= 5 // VMOptions=
6 // VMOptions=--short_socket_read 6 // VMOptions=--short_socket_read
7 // VMOptions=--short_socket_write 7 // VMOptions=--short_socket_write
8 // VMOptions=--short_socket_read --short_socket_write 8 // VMOptions=--short_socket_read --short_socket_write
9 9
10 import "package:expect/expect.dart"; 10 import "package:expect/expect.dart";
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Wait for both server and client to see the connections as closed. 77 // Wait for both server and client to see the connections as closed.
78 if (closed == connections * 2) { 78 if (closed == connections * 2) {
79 Expect.equals(0, server.connectionsInfo().active); 79 Expect.equals(0, server.connectionsInfo().active);
80 Expect.equals(server.connectionsInfo().total, 80 Expect.equals(server.connectionsInfo().total,
81 server.connectionsInfo().idle); 81 server.connectionsInfo().idle);
82 server.close(); 82 server.close();
83 } 83 }
84 } 84 }
85 server.listen((request) { 85 server.listen((request) {
86 var timer = new Timer.periodic(const Duration(milliseconds: 20), (_) { 86 var timer = new Timer.periodic(const Duration(milliseconds: 20), (_) {
87 request.response.writeBytes(new Uint8List(16 * 1024)); 87 request.response.add(new Uint8List(16 * 1024));
88 }); 88 });
89 request.response.done 89 request.response.done
90 .catchError((_) {}) 90 .catchError((_) {})
91 .whenComplete(() { 91 .whenComplete(() {
92 check(); 92 check();
93 timer.cancel(); 93 timer.cancel();
94 }); 94 });
95 }); 95 });
96 var client = new HttpClient(); 96 var client = new HttpClient();
97 for (int i = 0; i < connections; i++) { 97 for (int i = 0; i < connections; i++) {
(...skipping 12 matching lines...) Expand all
110 }); 110 });
111 } 111 }
112 112
113 113
114 void main() { 114 void main() {
115 testClientAndServerCloseNoListen(10); 115 testClientAndServerCloseNoListen(10);
116 testClientCloseServerListen(10); 116 testClientCloseServerListen(10);
117 testClientCloseSendingResponse(10); 117 testClientCloseSendingResponse(10);
118 } 118 }
119 119
OLDNEW
« no previous file with comments | « tests/standalone/io/http_client_request_test.dart ('k') | tests/standalone/io/http_compression_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698