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

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

Issue 10414002: More String + elimination in tests (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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:io"); 5 #import("dart:io");
6 #import("dart:isolate"); 6 #import("dart:isolate");
7 7
8 class ExpectedDataOutputStream implements OutputStream { 8 class ExpectedDataOutputStream implements OutputStream {
9 ExpectedDataOutputStream(List<int> this._data, 9 ExpectedDataOutputStream(List<int> this._data,
10 int this._cutoff, 10 int this._cutoff,
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // TODO(ajohnsen): Validate HttpServers number of connections. 201 // TODO(ajohnsen): Validate HttpServers number of connections.
202 } 202 }
203 for (int i = 1; i < response.length; i++) { 203 for (int i = 1; i < response.length; i++) {
204 bool _expectError = expectError && i < response.length - okayFrom; 204 bool _expectError = expectError && i < response.length - okayFrom;
205 runSettings(i, false, _expectError); 205 runSettings(i, false, _expectError);
206 runSettings(i, true, _expectError); 206 runSettings(i, true, _expectError);
207 } 207 }
208 } 208 }
209 testContent( 209 testContent(
210 "GET / HTTP/1.1\r\nKeep-Alive: False\r\n\r\n", 210 "GET / HTTP/1.1\r\nKeep-Alive: False\r\n\r\n",
211 "HTTP/1.1 200 OK\r\ntransfer-encoding: chunked\r\nconnection: close" + 211 "HTTP/1.1 200 OK\r\ntransfer-encoding: chunked\r\nconnection: close"
212 "\r\n\r\n0\r\n\r\n"); 212 "\r\n\r\n0\r\n\r\n");
213 213
214 server.close(); 214 server.close();
215 } 215 }
216 216
217 void main() { 217 void main() {
218 testSocketClose(); 218 testSocketClose();
219 } 219 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698