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

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

Issue 12793003: Rename Timer.repeating to Timer.periodic. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 "dart:async"; 10 import "dart:async";
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 closed++; 116 closed++;
117 // Wait for both server and client to see the connections as closed. 117 // Wait for both server and client to see the connections as closed.
118 if (closed == connections * 2) { 118 if (closed == connections * 2) {
119 Expect.equals(0, server.connectionsInfo().active); 119 Expect.equals(0, server.connectionsInfo().active);
120 Expect.equals(server.connectionsInfo().total, 120 Expect.equals(server.connectionsInfo().total,
121 server.connectionsInfo().idle); 121 server.connectionsInfo().idle);
122 server.close(); 122 server.close();
123 } 123 }
124 } 124 }
125 server.listen((request) { 125 server.listen((request) {
126 var timer = new Timer.repeating(const Duration(milliseconds: 20), (_) { 126 var timer = new Timer.periodic(const Duration(milliseconds: 20), (_) {
127 request.response.writeBytes(new Uint8List(16 * 1024)); 127 request.response.writeBytes(new Uint8List(16 * 1024));
128 }); 128 });
129 request.response.done 129 request.response.done
130 .catchError((_) {}) 130 .catchError((_) {})
131 .whenComplete(() { 131 .whenComplete(() {
132 check(); 132 check();
133 timer.cancel(); 133 timer.cancel();
134 }); 134 });
135 }); 135 });
136 var client = new HttpClient(); 136 var client = new HttpClient();
(...skipping 14 matching lines...) Expand all
151 } 151 }
152 152
153 153
154 void main() { 154 void main() {
155 testClientAndServerCloseNoListen(10); 155 testClientAndServerCloseNoListen(10);
156 testClientCloseServerListen(10); 156 testClientCloseServerListen(10);
157 testClientCloseDelayed(10); 157 testClientCloseDelayed(10);
158 testClientCloseSendingResponse(10); 158 testClientCloseSendingResponse(10);
159 } 159 }
160 160
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698